Add dev to cached dev list if entry is missing before auto connect
Fix for BLTH01482218 Change-Id: I7d5cfad3eff872b5eb0b0c71804f25f3c3334557
This commit is contained in:
committed by
Matthew Xie
parent
dbe1a24d35
commit
802956ec9b
@@ -333,12 +333,14 @@ final class LocalBluetoothProfileManager {
|
||||
BluetoothProfile.PRIORITY_AUTO_CONNECT) {
|
||||
Log.d(TAG,"handleAutoConnect for device");
|
||||
CachedBluetoothDevice cacheDevice = mDeviceManager.findDevice(device);
|
||||
if (null != cacheDevice) {
|
||||
cacheDevice.connectInt(profile);
|
||||
break;
|
||||
}
|
||||
else
|
||||
Log.e(TAG,"Bluetooth cache devices mismatch with actual");
|
||||
if (null == cacheDevice)
|
||||
{
|
||||
Log.w(TAG,"Dev not found in cached dev list. Adding the dev to cached list");
|
||||
cacheDevice = mDeviceManager.addDevice(mLocalAdapter,
|
||||
LocalBluetoothProfileManager.this, device);
|
||||
}
|
||||
cacheDevice.connectInt(profile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user