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

Commit 37262f72 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: 1c85c450 am: ea25bab7

Change-Id: Idb60088e4b308491bc0e6e889eea170ba3eea184
parents f0d9c040 ea25bab7
Loading
Loading
Loading
Loading
+9 −15
Original line number Original line Diff line number Diff line
@@ -103,7 +103,6 @@ public abstract class BluetoothProfileConnector<T> {


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


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


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