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) {
|
BluetoothProfile.PRIORITY_AUTO_CONNECT) {
|
||||||
Log.d(TAG,"handleAutoConnect for device");
|
Log.d(TAG,"handleAutoConnect for device");
|
||||||
CachedBluetoothDevice cacheDevice = mDeviceManager.findDevice(device);
|
CachedBluetoothDevice cacheDevice = mDeviceManager.findDevice(device);
|
||||||
if (null != cacheDevice) {
|
if (null == cacheDevice)
|
||||||
cacheDevice.connectInt(profile);
|
{
|
||||||
break;
|
Log.w(TAG,"Dev not found in cached dev list. Adding the dev to cached list");
|
||||||
}
|
cacheDevice = mDeviceManager.addDevice(mLocalAdapter,
|
||||||
else
|
LocalBluetoothProfileManager.this, device);
|
||||||
Log.e(TAG,"Bluetooth cache devices mismatch with actual");
|
}
|
||||||
|
cacheDevice.connectInt(profile);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user