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

am: e61ac8ec02

Change-Id: If1b5c0d5655ec7e2c465ef8b1633543ceba7181e
This commit is contained in:
Pavlin Radoslavov
2018-01-26 23:53:46 +00:00
committed by android-build-merger

View File

@@ -1881,7 +1881,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
synchronized (mBluetoothA2dpLock) { synchronized (mBluetoothA2dpLock) {
if (mBluetoothA2dp != null) { if (mBluetoothA2dp != null) {
codecStatus = mBluetoothA2dp.getCodecStatus(); codecStatus = mBluetoothA2dp.getCodecStatus(null); // Use current active device
if (codecStatus != null) { if (codecStatus != null) {
codecConfig = codecStatus.getCodecConfig(); codecConfig = codecStatus.getCodecConfig();
codecsLocalCapabilities = codecStatus.getCodecsLocalCapabilities(); codecsLocalCapabilities = codecStatus.getCodecsLocalCapabilities();
@@ -2100,14 +2100,14 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
case 6: case 6:
synchronized (mBluetoothA2dpLock) { synchronized (mBluetoothA2dpLock) {
if (mBluetoothA2dp != null) { if (mBluetoothA2dp != null) {
mBluetoothA2dp.enableOptionalCodecs(); mBluetoothA2dp.enableOptionalCodecs(null); // Use current active device
} }
} }
return; return;
case 7: case 7:
synchronized (mBluetoothA2dpLock) { synchronized (mBluetoothA2dpLock) {
if (mBluetoothA2dp != null) { if (mBluetoothA2dp != null) {
mBluetoothA2dp.disableOptionalCodecs(); mBluetoothA2dp.disableOptionalCodecs(null); // Use current active device
} }
} }
return; return;
@@ -2230,7 +2230,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
synchronized (mBluetoothA2dpLock) { synchronized (mBluetoothA2dpLock) {
if (mBluetoothA2dp != null) { if (mBluetoothA2dp != null) {
mBluetoothA2dp.setCodecConfigPreference(codecConfig); // Use current active device
mBluetoothA2dp.setCodecConfigPreference(null, codecConfig);
} }
} }
} }