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

Commit 9653736c authored by Calvin On's avatar Calvin On Committed by android-build-merger
Browse files

Work around/prevent NPE in aclStateChangedCallback.

am: 02b7cf5d

Change-Id: I462bc866296419519b059232d64305cf0357ddca
parents 83aa0b11 02b7cf5d
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -395,9 +395,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());
        }
    }