* 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,13 +333,15 @@ 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)
|
||||||
|
{
|
||||||
|
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);
|
cacheDevice.connectInt(profile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Log.e(TAG,"Bluetooth cache devices mismatch with actual");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user