b/2320107 NPE when receiving a Undock event without a device
Change-Id: Ic3c964f2d58462a1b7c82f2de2dd997679f90ba7
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user