am 38badc8b: am 9463c2f8: b/2320107 NPE when receiving a Undock event without a device

Merge commit '38badc8ba086febc93a905de91dccefa03cc1aae' into eclair-mr2-plus-aosp

* commit '38badc8ba086febc93a905de91dccefa03cc1aae':
  b/2320107 NPE when receiving a Undock event without a device
This commit is contained in:
Michael Chan
2009-12-11 12:23:37 -08:00
committed by Android Git Automerger

View File

@@ -131,7 +131,7 @@ public class BluetoothEventRedirector {
int anythingButUnDocked = Intent.EXTRA_DOCK_STATE_UNDOCKED + 1;
int state = intent.getIntExtra(Intent.EXTRA_DOCK_STATE, anythingButUnDocked);
if (state == Intent.EXTRA_DOCK_STATE_UNDOCKED) {
if (device.getBondState() == BluetoothDevice.BOND_NONE) {
if (device != null && device.getBondState() == BluetoothDevice.BOND_NONE) {
mManager.getCachedDeviceManager().onDeviceDisappeared(device);
}
}