TWS_AVRCP: Update relayed volume to TWS+ pair
Update local and remote volume for an earbud that receives
unsolicited accept response for which the volume level has been
relayed for the volume set by its pair.
Change-Id: I38fa739e9baa95cfa9da9231f3a161dc4912627a
diff --git a/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java b/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
index 9381d4c..dd91d2c 100644
--- a/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
+++ b/packages_apps_bluetooth_ext/src/avrcp/Avrcp_ext.java
@@ -1167,6 +1167,12 @@
if (msg.arg2 == AVRC_RSP_ACCEPT || msg.arg2 == AVRC_RSP_REJ) {
if ((deviceFeatures[deviceIndex].mVolCmdAdjustInProgress == false) &&
(deviceFeatures[deviceIndex].mVolCmdSetInProgress == false)) {
+ if (deviceFeatures[deviceIndex].mCurrentDevice.isTwsPlusDevice()) {
+ Log.e(TAG,"Store volume for TWS+ pair for volume relays");
+ deviceFeatures[deviceIndex].mRemoteVolume = absVol;
+ deviceFeatures[deviceIndex].mLocalVolume = convertToAudioStreamVolume(absVol);
+ break;
+ }
Log.e(TAG, "Unsolicited response, ignored");
break;
}