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

Commit c95a06d7 authored by Zhihai Xu's avatar Zhihai Xu Committed by Android Git Automerger
Browse files

am 57479e1f: Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345

* commit '57479e1f':
  Bluetooth Application Crash while try to pairing with laptop - IKDVXPSE-345
parents 7dd736b7 57479e1f
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -113,6 +113,18 @@ public class BluetoothMnsObexClient {
    }

    public void disconnect() {
        /* should shutdown handler thread first to make sure
         * handleRegistration won't be called when disconnet
         */
        if (mHandler != null) {
            // Shut down the thread
            mHandler.removeCallbacksAndMessages(null);
            Looper looper = mHandler.getLooper();
            if (looper != null) {
                looper.quit();
            }
            mHandler = null;
        }
        try {
            if (mClientSession != null) {
                mClientSession.disconnect(null);
@@ -150,15 +162,6 @@ public class BluetoothMnsObexClient {
            mObserver.deinit();
            mObserver = null;
        }
        if (mHandler != null) {
            // Shut down the thread
            mHandler.removeCallbacksAndMessages(null);
            Looper looper = mHandler.getLooper();
            if (looper != null) {
                looper.quit();
            }
            mHandler = null;
        }
    }

    private HeaderSet hsConnect = null;