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

Commit aa11f0f8 authored by Sal Savage's avatar Sal Savage Committed by Gerrit Code Review
Browse files

Merge "Resolve NPE in getConnectionState()"

parents 00d0b704 38b2e957
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;
        }