summaryrefslogtreecommitdiff
path: root/src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java
diff options
context:
space:
mode:
authorDaniel Chapin <chapin@google.com>2020-02-12 17:16:10 +0000
committerDaniel Chapin <chapin@google.com>2020-02-12 17:16:10 +0000
commit2be6fc2afeec69943fd2e77851d48e87c6688c1c (patch)
treec15fe1fbbabdd503920de91a8322e8ee73b83361 /src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java
parentdcedd7d6f58bcb267d92dd35fec6a094086eab97 (diff)
Revert "Pass in active device to all BluetoothA2dp APIs in packa..."
Revert submission 10253996-bt-a2dp-no-null Reason for revert: b/149361880 Reverted Changes: If43934374: Pass in active device to all BluetoothA2dp APIs in... I22dd1ca36: Make sure calls to BluetoothA2dp APIs pass non-nul... If6475af6f: Require user pass in a non-null BluetoothDevice to... I9d0e2c89c: Pass in active device to all BluetoothA2dp APIs in... I1faa6174d: Need to now pass in active device instead of null ... I69a941a7e: Pass in active device to all BluetoothA2dp APIs in... Change-Id: I1d8660b11c917cf657e61478d58794182e17ec1a
Diffstat (limited to 'src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java')
-rw-r--r--src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java b/src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java
index 128f4dae01..0f429c729f 100644
--- a/src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java
+++ b/src/com/android/settings/development/AbstractBluetoothA2dpPreferenceController.java
@@ -83,7 +83,7 @@ public abstract class AbstractBluetoothA2dpPreferenceController extends
final BluetoothCodecConfig codecConfig = mBluetoothA2dpConfigStore.createCodecConfig();
synchronized (mBluetoothA2dpConfigStore) {
if (mBluetoothA2dp != null) {
- setCodecConfigPreference(mBluetoothA2dp.getActiveDevice(), codecConfig);
+ setCodecConfigPreference(null, codecConfig); // Use current active device
}
}
// Because the setting is not persisted into permanent storage, we cannot call update state
@@ -102,14 +102,13 @@ public abstract class AbstractBluetoothA2dpPreferenceController extends
@Override
public void updateState(Preference preference) {
- BluetoothDevice activeDevice = mBluetoothA2dp.getActiveDevice();
- if (getCodecConfig(activeDevice) == null || mPreference == null) {
+ if (getCodecConfig(null) == null || mPreference == null) { // Use current active device
return;
}
BluetoothCodecConfig codecConfig;
synchronized (mBluetoothA2dpConfigStore) {
- codecConfig = getCodecConfig(activeDevice);
+ codecConfig = getCodecConfig(null); // Use current active device
}
final int index = getCurrentA2dpSettingIndex(codecConfig);