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

Commit ebc7f793 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Make onServiceDisconnected be called"

parents 59791a74 f314930e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -448,7 +448,11 @@ public final class BluetoothHeadset implements BluetoothProfile {
                Log.e(TAG, "", re);
            }
        }

        if (mServiceListener != null) {
            mServiceListener.onServiceDisconnected(BluetoothProfile.HEADSET);
            mServiceListener = null;
        }
        doUnbind();
        mCloseGuard.close();
    }
+4 −1
Original line number Diff line number Diff line
@@ -188,7 +188,10 @@ public abstract class BluetoothProfileConnector<T> {
    }

    void disconnect() {
        if (mServiceListener != null) {
            mServiceListener.onServiceDisconnected(mProfileId);
            mServiceListener = null;
        }
        IBluetoothManager mgr = BluetoothAdapter.getDefaultAdapter().getBluetoothManager();
        if (mgr != null) {
            try {