summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/pandora/server/configs/pts_bot_tests_config.json16
-rw-r--r--android/pandora/server/configs/pts_bot_tests_config_auto.json17
-rw-r--r--sysprop/a2dp.sysprop7
-rw-r--r--system/bta/av/bta_av_aact.cc9
4 files changed, 46 insertions, 3 deletions
diff --git a/android/pandora/server/configs/pts_bot_tests_config.json b/android/pandora/server/configs/pts_bot_tests_config.json
index 91e77b7ae2..7b44a66f18 100644
--- a/android/pandora/server/configs/pts_bot_tests_config.json
+++ b/android/pandora/server/configs/pts_bot_tests_config.json
@@ -3251,6 +3251,14 @@
"VCP/VC/SPE/BI-19-C",
"VCP/VC/SPE/BI-20-C"
]
+ },
+ {
+ "flags": [
+ "avdt_accept_open_timeout_ms"
+ ],
+ "tests": [
+ "A2DP/SNK/SYN/BV-01-C"
+ ]
}
],
"system_properties": [
@@ -3298,6 +3306,14 @@
"tests": [
"HFP/AG"
]
+ },
+ {
+ "system_properties": {
+ "bluetooth.a2dp.avdt_accept_open_timeout_ms": "15000"
+ },
+ "tests": [
+ "A2DP/SNK/SYN/BV-01-C"
+ ]
}
]
}
diff --git a/android/pandora/server/configs/pts_bot_tests_config_auto.json b/android/pandora/server/configs/pts_bot_tests_config_auto.json
index 6b319a0179..425b79c8e8 100644
--- a/android/pandora/server/configs/pts_bot_tests_config_auto.json
+++ b/android/pandora/server/configs/pts_bot_tests_config_auto.json
@@ -375,7 +375,14 @@
"SPP": {},
"VCP": {}
},
- "flags": {},
+ "flags": {
+ "flags": [
+ "avdt_accept_open_timeout_ms"
+ ],
+ "tests": [
+ "A2DP/SNK/SYN/BV-01-C"
+ ]
+ },
"system_properties": [
{
"system_properties": {
@@ -421,6 +428,14 @@
"tests": [
"HFP/AG"
]
+ },
+ {
+ "system_properties": {
+ "bluetooth.a2dp.avdt_accept_open_timeout_ms": "15000"
+ },
+ "tests": [
+ "A2DP/SNK/SYN/BV-01-C"
+ ]
}
]
}
diff --git a/sysprop/a2dp.sysprop b/sysprop/a2dp.sysprop
index 80b359c390..ae02fbbb99 100644
--- a/sysprop/a2dp.sysprop
+++ b/sysprop/a2dp.sysprop
@@ -9,3 +9,10 @@ prop {
prop_name: "bluetooth.a2dp.src_sink_coexist.enabled"
}
+prop {
+ api_name: "avdt_accept_open_timeout_ms"
+ type: Integer
+ scope: Internal
+ access: Readonly
+ prop_name: "bluetooth.a2dp.avdt_accept_open_timeout_ms"
+} \ No newline at end of file
diff --git a/system/bta/av/bta_av_aact.cc b/system/bta/av/bta_av_aact.cc
index 8cb73a4402..5854c8aa6c 100644
--- a/system/bta/av/bta_av_aact.cc
+++ b/system/bta/av/bta_av_aact.cc
@@ -26,6 +26,7 @@
#define LOG_TAG "bluetooth-a2dp"
+#include <android_bluetooth_sysprop.h>
#include <bluetooth/log.h>
#include <com_android_bluetooth_flags.h>
@@ -1134,7 +1135,11 @@ void bta_av_setconfig_rsp(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
if (!p_scb->accept_open_timer) {
p_scb->accept_open_timer = alarm_new("accept_open_timer");
}
- alarm_set_on_mloop(p_scb->accept_open_timer, BTA_AV_ACCEPT_OPEN_TIMEOUT_MS,
+ const uint64_t accept_open_timeout =
+ android::sysprop::bluetooth::A2dp::avdt_accept_open_timeout_ms().value_or(
+ BTA_AV_ACCEPT_OPEN_TIMEOUT_MS);
+ log::debug("accept_open_timeout = {} ms", accept_open_timeout);
+ alarm_set_on_mloop(p_scb->accept_open_timer, accept_open_timeout,
bta_av_accept_open_timer_cback, UINT_TO_PTR(p_scb->hdi));
}
}
@@ -3402,4 +3407,4 @@ static void bta_av_accept_open_timer_cback(void* data) {
tBTA_AV_API_OPEN* p_buf = (tBTA_AV_API_OPEN*)osi_malloc(sizeof(tBTA_AV_API_OPEN));
memcpy(p_buf, &(p_scb->open_api), sizeof(tBTA_AV_API_OPEN));
bta_sys_sendmsg(p_buf);
-} \ No newline at end of file
+}