Merge change I25f2afba into eclair

* changes:
  Check if a device is added to the cache before returning.
This commit is contained in:
Android (Google) Code Review
2009-10-01 16:07:49 -04:00

View File

@@ -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);