summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpenghua <quic_penghua@quicinc.com>2022-02-24 14:33:37 +0800
committerpenghua <quic_penghua@quicinc.com>2022-02-28 10:53:30 +0800
commit11cb61f7c2f40143d3fa66878ac4633d1b9244b7 (patch)
tree54e25f90a6c90bbae944598668221dabc0567c75
parentf9b635bd8bebc15af3819ea204d3694669065933 (diff)
Resume A2DP only if call is idle and no sco is active
Resume A2DP only if call is idle and no sco is active. CRs-Fixed: 3132771 Change-Id: Icc7480b2b09af41d75d777a1679a72ed242c19fb
-rw-r--r--src/com/android/bluetooth/hfp/HeadsetService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/bluetooth/hfp/HeadsetService.java b/src/com/android/bluetooth/hfp/HeadsetService.java
index 53dd75d5f..6a480f340 100644
--- a/src/com/android/bluetooth/hfp/HeadsetService.java
+++ b/src/com/android/bluetooth/hfp/HeadsetService.java
@@ -2505,7 +2505,8 @@ public class HeadsetService extends ProfileService {
doForEachConnectedConnectingStateMachine(
stateMachine -> stateMachine.sendMessage(HeadsetStateMachine.CALL_STATE_CHANGED,
new HeadsetCallState(numActive, numHeld, callState, number, type, name)));
- if (!(mSystemInterface.isInCall() || mSystemInterface.isRinging())) {
+ if (!(mSystemInterface.isInCall() || mSystemInterface.isRinging()
+ || isAudioOn())) {
Log.i(TAG, "no call, sending resume A2DP message to state machines");
for (BluetoothDevice device : availableDevices) {
HeadsetStateMachine stateMachine = mStateMachines.get(device);