Merge "Add support for Multi-A2DP state machines per device"
am: e61ac8ec02

Change-Id: If1b5c0d5655ec7e2c465ef8b1633543ceba7181e
diff --git a/src/com/android/settings/development/DevelopmentSettings.java b/src/com/android/settings/development/DevelopmentSettings.java
index ffe9db4..748d452 100644
--- a/src/com/android/settings/development/DevelopmentSettings.java
+++ b/src/com/android/settings/development/DevelopmentSettings.java
@@ -1881,7 +1881,7 @@
 
         synchronized (mBluetoothA2dpLock) {
             if (mBluetoothA2dp != null) {
-                codecStatus = mBluetoothA2dp.getCodecStatus();
+                codecStatus = mBluetoothA2dp.getCodecStatus(null);      // Use current active device
                 if (codecStatus != null) {
                     codecConfig = codecStatus.getCodecConfig();
                     codecsLocalCapabilities = codecStatus.getCodecsLocalCapabilities();
@@ -2100,14 +2100,14 @@
         case 6:
         synchronized (mBluetoothA2dpLock) {
             if (mBluetoothA2dp != null) {
-                mBluetoothA2dp.enableOptionalCodecs();
+                mBluetoothA2dp.enableOptionalCodecs(null); // Use current active device
             }
         }
         return;
         case 7:
         synchronized (mBluetoothA2dpLock) {
             if (mBluetoothA2dp != null) {
-                mBluetoothA2dp.disableOptionalCodecs();
+                mBluetoothA2dp.disableOptionalCodecs(null); // Use current active device
             }
         }
         return;
@@ -2230,7 +2230,8 @@
 
         synchronized (mBluetoothA2dpLock) {
             if (mBluetoothA2dp != null) {
-                mBluetoothA2dp.setCodecConfigPreference(codecConfig);
+                // Use current active device
+                mBluetoothA2dp.setCodecConfigPreference(null, codecConfig);
             }
         }
     }