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

Commit 02b7cf5d authored by Calvin On's avatar Calvin On
Browse files

Work around/prevent NPE in aclStateChangedCallback.

Bug: 62440980
Change-Id: I0fd02d80a9cb656a253e537a4ce2dd538df4c48d
parent 8d671949
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -394,9 +394,15 @@ final class RemoteDevices {
            }
            debugLog("aclStateChangeCallback: State:DisConnected to Device:" + device);
        }

        if (intent != null) {
            intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            mAdapterService.sendBroadcast(intent, mAdapterService.BLUETOOTH_PERM);
        } else {
            Log.e(TAG, "aclStateChangeCallback intent is null. deviceBondState: "
                    + device.getBondState());
        }
    }