From 5ea726b51f0f71ce8b2fc0544789bd85e48f1dd6 Mon Sep 17 00:00:00 2001 From: Venkata Jagadeesh Date: Fri, 20 May 2016 13:08:35 +0530 Subject: Don't remove bonding device from cached device list during inquiry Use case: DUT unable to start auto connect after pairing to remote devices Steps: 1. pair with remote device 2. unpair remote device. 3. Pair again to same remote from available devices list and initiate inquiry same time Failure: DUT unable to start auto connect after pairing to remote device Root Cause: As bonding device is removed from cached device list,a new cached device entry is created after bonding with auto connection variable reset. Fix: This issue fixed by deleting only non bonded and non bonding devices during inquiry. Test: Tested with Beats Wireless Bug: 35415106 Change-Id: I9d1c399292420fa2e321a4f6410e672a2abcc423 --- .../com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java index abd4e294fecb..9217338884d0 100755 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java @@ -118,7 +118,7 @@ public class CachedBluetoothDeviceManager { public synchronized void clearNonBondedDevices() { for (int i = mCachedDevices.size() - 1; i >= 0; i--) { CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); - if (cachedDevice.getBondState() != BluetoothDevice.BOND_BONDED) { + if (cachedDevice.getBondState() == BluetoothDevice.BOND_NONE) { mCachedDevices.remove(i); } } -- cgit v1.2.3-59-g8ed1b