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

Commit 6cf0dcc1 authored by Hungyen Weng's avatar Hungyen Weng Committed by Automerger Merge Worker
Browse files

Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'...""...

Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev am: 1c85c4501b

Change-Id: I12ad1c145a368be02b68b83e4568149cc7703202
parents 17421a5b d0a2a9a2
Loading
Loading
Loading
Loading
+9 −15
Original line number Diff line number Diff line
@@ -103,7 +103,6 @@ public abstract class BluetoothProfileConnector<T> {

    private void doUnbind() {
        synchronized (mConnection) {
            try {
            if (mService != null) {
                logDebug("Unbinding service...");
                try {
@@ -114,12 +113,6 @@ public abstract class BluetoothProfileConnector<T> {
                    mService = null;
                }
            }
            } finally {
                if (mServiceListener != null) {
                    mServiceListener.onServiceDisconnected(mProfileId);
                    mServiceListener = null;
                }
            }
        }
    }

@@ -138,6 +131,7 @@ public abstract class BluetoothProfileConnector<T> {
    }

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