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

Commit 1c85c450 authored by Hungyen Weng's avatar Hungyen Weng Committed by Android (Google) Code Review
Browse files

Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev

parents cb7f8e72 ba5692ea
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 {