BondStateMachine: Check for null before calling getDeviceType

Bug: 128572820
Bug: 79703832
Test: Compilation
Change-Id: I711e08b076adb7b4808d04a47cb067cb95606f96
diff --git a/src/com/android/bluetooth/btservice/BondStateMachine.java b/src/com/android/bluetooth/btservice/BondStateMachine.java
index ecfbd12..d7dab6d 100644
--- a/src/com/android/bluetooth/btservice/BondStateMachine.java
+++ b/src/com/android/bluetooth/btservice/BondStateMachine.java
@@ -365,9 +365,9 @@
 
         mAdapterProperties.onBondStateChanged(device, newState);
 
-        if ((devProp.getDeviceType() == BluetoothDevice.DEVICE_TYPE_CLASSIC
+        if (devProp != null && ((devProp.getDeviceType() == BluetoothDevice.DEVICE_TYPE_CLASSIC
                 || devProp.getDeviceType() == BluetoothDevice.DEVICE_TYPE_DUAL)
-                && newState == BluetoothDevice.BOND_BONDED && devProp.getUuids() == null) {
+                && newState == BluetoothDevice.BOND_BONDED && devProp.getUuids() == null)) {
             infoLog(device + " is bonded, wait for SDP complete to broadcast bonded intent");
             if (!mPendingBondedDevices.contains(device)) {
                 mPendingBondedDevices.add(device);