Merge commit '0a0225418366e4502e18e414e71a04d575b1a47e' * commit '0a0225418366e4502e18e414e71a04d575b1a47e': b/2320107 NPE when receiving a Undock event without a device
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