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:
@@ -58,11 +58,11 @@ public class BluetoothHDAudioPreferenceController extends AbstractBluetoothPrefe
|
||||
mPreference.setEnabled(false);
|
||||
return;
|
||||
}
|
||||
final boolean supported = (bluetoothA2dp.supportsOptionalCodecs(activeDevice)
|
||||
final boolean supported = (bluetoothA2dp.isOptionalCodecsSupported(activeDevice)
|
||||
== BluetoothA2dp.OPTIONAL_CODECS_SUPPORTED);
|
||||
mPreference.setEnabled(supported);
|
||||
if (supported) {
|
||||
final boolean isEnabled = bluetoothA2dp.getOptionalCodecsEnabled(activeDevice)
|
||||
final boolean isEnabled = bluetoothA2dp.isOptionalCodecsEnabled(activeDevice)
|
||||
== BluetoothA2dp.OPTIONAL_CODECS_PREF_ENABLED;
|
||||
((SwitchPreference) mPreference).setChecked(isEnabled);
|
||||
}
|
||||
|
Reference in New Issue
Block a user