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

Commit d0a2a9a2 authored by Hungyen Weng's avatar Hungyen Weng
Browse files

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

Revert submission 11348591-btmap-close-gts

Reason for revert: Droidcop reverted the change due to test failure, Test failed. https://android-build.googleplex.com/builds/tests/view?invocationId=I05500004181087103&testResultId=TR42507671126333727

Reverted Changes:
I324b4ea66:BluetoothProfileConnecter now calls the ServiceLis...
I1427f1a86:Add GTS test for BluetoothMap#close

Bug: 155587865

Change-Id: I9a2645c7bbaec9fdf0c6f5972b08ba70cfe78741
parent 443a7030
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 {