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

Merge commit '9463c2f8d5f09ef9cc015405640bbf845f0f7a8a' into eclair-mr2

* commit '9463c2f8d5f09ef9cc015405640bbf845f0f7a8a':
  b/2320107 NPE when receiving a Undock event without a device
This commit is contained in:
Michael Chan
2009-12-10 23:08:40 -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);
}
}