diff options
author | Rahul Sabnis <rahulsabnis@google.com> | 2020-02-25 22:28:00 +0000 |
---|---|---|
committer | Rahul Sabnis <rahulsabnis@google.com> | 2020-02-27 17:00:24 -0800 |
commit | fc8115d91bc3ded8918c7a3c6cb6fcf2fc9e5657 (patch) | |
tree | 2592f167b906b44574209b8cb35e0db9208f5844 /src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java | |
parent | 149508de8c4baab5fa5c81fa63affeab842d0090 (diff) |
Revert "Revert "Pass in active device to all BluetoothA2dp APIs ..."
Revert submission 10303287-revert-10253996-bt-a2dp-no-null-FQRXACWPIA
Reason for revert: Fixing breakage
Reverted Changes:
I4d9f2f819:Revert "Make sure calls to BluetoothA2dp APIs pass...
I771ca0d57:Revert "Need to now pass in active device instead ...
I76529c7a1:Revert "Pass in active device to all BluetoothA2dp...
I297bda68d:Revert "Require user pass in a non-null BluetoothD...
I525327959:Revert "Pass in active device to all BluetoothA2dp...
I1d8660b11:Revert "Pass in active device to all BluetoothA2dp...
Bug: 147287141
Test: robotests
Change-Id: I5aecfa4b5a8e371b914573ddd080acb98078bfca
Diffstat (limited to 'src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java')
-rw-r--r-- | src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java b/src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java index c2977a8681..a0af268c8f 100644 --- a/src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java +++ b/src/com/android/settings/development/bluetooth/BluetoothCodecDialogPreferenceController.java @@ -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(activeDevice); 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: |