* commit '8a0103df4ef5425ca63071ab0b8db4b3cf00dbd2': Add dev to cached dev list if entry is missing before auto connect
This commit is contained in:
committed by
Android Git Automerger
commit
aa9ab830f3
@@ -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