Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 332c48a1 authored by Myles Watson's avatar Myles Watson
Browse files

DO NOT MERGE: BondStateMachine: Check for null before calling getDeviceType

Bug: 128572820
Bug: 79703832
Test: Compilation
Change-Id: I711e08b076adb7b4808d04a47cb067cb95606f96
Merged-In: I711e08b076adb7b4808d04a47cb067cb95606f96
parent 5c9ea24a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -364,9 +364,9 @@ final class BondStateMachine extends StateMachine {

        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);