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
This commit is contained in:
Venkata Jagadeesh
2016-05-20 13:08:35 +05:30
committed by Myles Watson
parent cdb84d2fc7
commit 5ea726b51f

View File

@@ -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);
}
}