Update disconnect to MM after removing active device
if active device is null than remove AVRCP active
device before disconnect update to MM
CRs-Fixed: 2705812
Change-Id: I7ccb5d886c1a2034b1d7a9c5b1f2d1cacea2e70a
diff --git a/src/com/android/bluetooth/a2dp/A2dpService.java b/src/com/android/bluetooth/a2dp/A2dpService.java
index 3c8435b..38ba2d6 100755
--- a/src/com/android/bluetooth/a2dp/A2dpService.java
+++ b/src/com/android/bluetooth/a2dp/A2dpService.java
@@ -880,11 +880,11 @@
if (device == null) {
// Remove active device and continue playing audio only if necessary.
- removeActiveDevice(false);
synchronized(mBtAvrcpLock) {
if(mAvrcp_ext != null)
mAvrcp_ext.setActiveDevice(device);
}
+ removeActiveDevice(false);
return true;
}