diff options
| author | 2016-05-20 13:08:35 +0530 | |
|---|---|---|
| committer | 2017-12-05 22:31:49 +0000 | |
| commit | 5ea726b51f0f71ce8b2fc0544789bd85e48f1dd6 (patch) | |
| tree | b4cf7782e46d166e779711f233f4aa58ce6c4821 | |
| parent | cdb84d2fc722f9f28bbcaee949798324c95c068a (diff) | |
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
| -rwxr-xr-x | packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java | 2 | 
1 files changed, 1 insertions, 1 deletions
| 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);              }          } |