AVRCP: removed stored volume and absolute volume support when connection state changed
When connected device state is changed to unbond than saved absolute volume
support and volume entry will removed.
CRs-Fixed: 2532871
Change-Id: I86ffd47426c80ccaf2d6457979a071f8b5a67b05
diff --git a/src/com/android/bluetooth/a2dp/A2dpService.java b/src/com/android/bluetooth/a2dp/A2dpService.java
index 6751a14..1cc276f 100644
--- a/src/com/android/bluetooth/a2dp/A2dpService.java
+++ b/src/com/android/bluetooth/a2dp/A2dpService.java
@@ -1591,6 +1591,9 @@
if (mFactory.getAvrcpTargetService() != null) {
mFactory.getAvrcpTargetService().removeStoredVolumeForDevice(device);
}
+ if (mAvrcp_ext != null) {
+ mAvrcp_ext.removeVolumeForDevice(device);
+ }
removeStateMachine(device);
}
@@ -1687,7 +1690,9 @@
if (mFactory.getAvrcpTargetService() != null) {
mFactory.getAvrcpTargetService().removeStoredVolumeForDevice(device);
}
-
+ if (mAvrcp_ext != null) {
+ mAvrcp_ext.removeVolumeForDevice(device);
+ }
removeStateMachine(device);
}
}