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,9 +172,15 @@ 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; return;
} }
cachedDevice = findDevice(device);
if (cachedDevice == null) {
Log.e(TAG, "Got bonding state changed for " + device +
"but device not added in cache");
return;
}
}
cachedDevice.onBondingStateChanged(bondState); cachedDevice.onBondingStateChanged(bondState);