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

Commit 2c244384 authored by Sal Savage's avatar Sal Savage Committed by Automerger Merge Worker
Browse files

Merge "Resolve NPE in getConnectionState()" am: aa11f0f8

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/1596936

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I961ede20eb0156a601ec9b024baacc36445b6d5c
parents 42828b70 aa11f0f8
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1742,11 +1742,7 @@ public class HeadsetClientStateMachine extends StateMachine {
     * @hide
     */
    public synchronized int getConnectionState(BluetoothDevice device) {
        if (mCurrentDevice == null) {
            return BluetoothProfile.STATE_DISCONNECTED;
        }

        if (!mCurrentDevice.equals(device)) {
        if (device == null || !device.equals(mCurrentDevice)) {
            return BluetoothProfile.STATE_DISCONNECTED;
        }