summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/bluetooth/hfp/HeadsetStateMachine.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/bluetooth/hfp/HeadsetStateMachine.java b/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
index 83911f0c0..36a8e4971 100644
--- a/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
+++ b/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
@@ -2624,6 +2624,13 @@ public class HeadsetStateMachine extends StateMachine {
private void processIntentA2dpPlayStateChanged(int a2dpState) {
Log.d(TAG, "Enter processIntentA2dpPlayStateChanged(): a2dp state "+
a2dpState);
+
+ int cura2dpstate = mHeadsetService.getHfpA2DPSyncInterface().isA2dpPlaying();
+ if (cura2dpstate == HeadsetA2dpSync.A2DP_PLAYING) {
+ Log.d(TAG, "a2dp is PALYING, ignore this A2DP_STATE_CHANGED event");
+ return;
+ }
+
if (mHeadsetService.isVRStarted()) {
Log.d(TAG, "VR is in started state");
if (mDevice.equals(mHeadsetService.getActiveDevice())) {