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

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

Merge "Resolve NPE in getConnectionState()"

parents 1a3c30aa de1a5429
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;
        }