Loading src/com/android/settings/bluetooth/BluetoothSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem removeAllDevices(); } mLocalManager.getCachedDeviceManager().clearCachedDevices(); mLocalManager.getCachedDeviceManager().clearNonBondedDevices(); mAvailableDevicesCategory.removeAll(); mInitialScanStarted = true; mLocalAdapter.startScanning(true); Loading src/com/android/settings/bluetooth/CachedBluetoothDeviceManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -112,8 +112,13 @@ final class CachedBluetoothDeviceManager { return device.getAddress(); } public synchronized void clearCachedDevices() { mCachedDevices.clear(); public synchronized void clearNonBondedDevices() { for (int i = mCachedDevices.size() - 1; i >= 0; i--) { CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); if (cachedDevice.getBondState() != BluetoothDevice.BOND_BONDED) { mCachedDevices.remove(i); } } } public synchronized void onScanningStateChanged(boolean started) { Loading Loading
src/com/android/settings/bluetooth/BluetoothSettings.java +1 −1 Original line number Diff line number Diff line Loading @@ -245,7 +245,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem removeAllDevices(); } mLocalManager.getCachedDeviceManager().clearCachedDevices(); mLocalManager.getCachedDeviceManager().clearNonBondedDevices(); mAvailableDevicesCategory.removeAll(); mInitialScanStarted = true; mLocalAdapter.startScanning(true); Loading
src/com/android/settings/bluetooth/CachedBluetoothDeviceManager.java +9 −4 Original line number Diff line number Diff line Loading @@ -112,8 +112,13 @@ final class CachedBluetoothDeviceManager { return device.getAddress(); } public synchronized void clearCachedDevices() { mCachedDevices.clear(); public synchronized void clearNonBondedDevices() { for (int i = mCachedDevices.size() - 1; i >= 0; i--) { CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); if (cachedDevice.getBondState() != BluetoothDevice.BOND_BONDED) { mCachedDevices.remove(i); } } } public synchronized void onScanningStateChanged(boolean started) { Loading