Merge change I25f2afba into eclair
* changes: Check if a device is added to the cache before returning.
This commit is contained in:
@@ -172,8 +172,14 @@ public class CachedBluetoothDeviceManager {
|
|||||||
if (!readPairedDevices()) {
|
if (!readPairedDevices()) {
|
||||||
Log.e(TAG, "Got bonding state changed for " + device +
|
Log.e(TAG, "Got bonding state changed for " + device +
|
||||||
", but we have no record of that device.");
|
", but we have no record of that device.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cachedDevice = findDevice(device);
|
||||||
|
if (cachedDevice == null) {
|
||||||
|
Log.e(TAG, "Got bonding state changed for " + device +
|
||||||
|
"but device not added in cache");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cachedDevice.onBondingStateChanged(bondState);
|
cachedDevice.onBondingStateChanged(bondState);
|
||||||
|
Reference in New Issue
Block a user