Merge "Resume A2DP when VR app stops VR without SCO" into q-keystone-qcom-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ff6ab4f..bc10b4b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -76,9 +76,6 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.OVERRIDE_WIFI_CONFIG" />
- <!-- Allows access to read media audio -->
- <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
-
<!-- Allows application to write to internal media storage -->
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
diff --git a/src/com/android/bluetooth/a2dp/A2dpService.java b/src/com/android/bluetooth/a2dp/A2dpService.java
index b11ae58..cc2de60 100644
--- a/src/com/android/bluetooth/a2dp/A2dpService.java
+++ b/src/com/android/bluetooth/a2dp/A2dpService.java
@@ -1317,10 +1317,13 @@
// Inform the Audio Service about the codec configuration change,
// so the Audio Service can reset accordingly the audio feeding
// parameters in the Audio HAL to the Bluetooth stack.
+ int rememberedVolume = -1;
if (isActiveDevice(device) && !sameAudioFeedingParameters) {
+ if (mAvrcp_ext != null)
+ rememberedVolume = mAvrcp_ext.getVolume(device);
mAudioManager.handleBluetoothA2dpActiveDeviceChange(device,
BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP,
- true, -1);
+ true, rememberedVolume);
}
}
void updateTwsChannelMode(int state, BluetoothDevice device) {