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