Pass in active device to all BluetoothA2dp APIs in

packages/apps/Settings as null input is no longer supported

Bug: 147287141
Test: Manual
Change-Id: If43934374914c657080ffd0509f8095d988cc550
This commit is contained in:
Rahul Sabnis
2020-02-03 18:22:54 -08:00
parent 3c77bd3631
commit dcedd7d6f5
11 changed files with 58 additions and 36 deletions

View File

@@ -83,9 +83,9 @@ public class BluetoothCodecDialogPreferenceController extends
return index;
}
// Check HD audio is enabled, display the available list.
if (bluetoothA2dp.getOptionalCodecsEnabled(activeDevice)
if (bluetoothA2dp.isOptionalCodecsEnabled(activeDevice)
== BluetoothA2dp.OPTIONAL_CODECS_PREF_ENABLED) {
BluetoothCodecConfig[] configs = getSelectableConfigs(null);
BluetoothCodecConfig[] configs = getSelectableConfigs(bluetoothA2dp.getActiveDevice());
if (configs != null) {
return getIndexFromConfig(configs);
}
@@ -101,7 +101,8 @@ public class BluetoothCodecDialogPreferenceController extends
int codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
switch (index) {
case 0:
codecTypeValue = getHighestCodec(getSelectableConfigs(null));
codecTypeValue = getHighestCodec(getSelectableConfigs(
mBluetoothA2dp.getActiveDevice()));
codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
break;
case 1: