audiopolicy: increase binder command timeout for some commmands

Extend timeout for SET_DEVICE_CONNECTION_STATE and HANDLE_DEVICE_CONFIG_CHANGE
binder commmands in IAudioPolicyService.cpp while we investigate why BT A2DP
device connection/disconnection can sometimes take more than 5 seconds.

Bug: 74840091
Test: check that no timout occurs for A2DP headset connections
Change-Id: I7dcba80059898ac1c73d580594d4956b4608ade0
gugelfrei
Eric Laurent 6 years ago
parent bebc764c6b
commit 09e621a7b1

@ -883,7 +883,20 @@ status_t BnAudioPolicyService::onTransact(
break;
}
TimeCheck check("IAudioPolicyService");
// FIXME: extend timeout for SET_DEVICE_CONNECTION_STATE and HANDLE_DEVICE_CONFIG_CHANGE
// while we investigate why BT A2DP device connection/disconnection can sometimes
// take more than 5 seconds
uint32_t timeoutMs = TimeCheck::kDefaultTimeOutMs;
switch (code) {
case SET_DEVICE_CONNECTION_STATE:
case HANDLE_DEVICE_CONFIG_CHANGE:
timeoutMs *= 2;
break;
default:
break;
}
TimeCheck check("IAudioPolicyService", timeoutMs);
switch (code) {
case SET_DEVICE_CONNECTION_STATE: {

Loading…
Cancel
Save