From c7715a5519acfa7229f8a9c9b0f84abf59045efd Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Tue, 6 Feb 2018 13:58:20 -0800 Subject: [PATCH] Update the Bluetooth Active Device state in the Device Manager The Bluetooth Active Device state should be updated for all CachedBluetoothDevice entries. This should be done inside CachedBluetoothDeviceManager in SettingsLib instead of BluetoothDeviceUpdater in the Settings app. Bug: 72316092 Test: Manual - two headsets and switching the active device Change-Id: If379bb0853dcd78385430cf14192e9adfae4ecd0 --- .../settings/bluetooth/BluetoothDeviceUpdater.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java b/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java index dbe2c1b336a..63763472a81 100644 --- a/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java +++ b/src/com/android/settings/bluetooth/BluetoothDeviceUpdater.java @@ -185,14 +185,6 @@ public abstract class BluetoothDeviceUpdater implements BluetoothCallback { @Override public void onActiveDeviceChanged(CachedBluetoothDevice activeDevice, int bluetoothProfile) { - Collection cachedDevices = - mLocalManager.getCachedDeviceManager().getCachedDevicesCopy(); - // TODO: The state update of the Cached Bluetooth Devices should be - // moved to the device manager: b/72316092 - for (CachedBluetoothDevice cachedBluetoothDevice : cachedDevices) { - boolean isActive = Objects.equals(cachedBluetoothDevice, activeDevice); - cachedBluetoothDevice.setActiveDevice(isActive, bluetoothProfile); - } } /**