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

Commit d1ee7f81 authored by Myles Watson's avatar Myles Watson Committed by android-build-merger
Browse files

Merge "BondStateMachine: Check for null before calling getDeviceType" into...

Merge "BondStateMachine: Check for null before calling getDeviceType" into oc-mr1-dev am: 7a11b2cf
am: b6ad28d7

Change-Id: Iaef336f51c37bcbb4e76d9c8c3ae312979d56b9c
parents cd92f73d b6ad28d7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -395,9 +395,9 @@ final class BondStateMachine extends StateMachine {
                mAdapterService.obfuscateAddress(device), classOfDevice);
        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);