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

Commit 36d00dea authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by android-build-merger
Browse files

Merge "Stop HfpClientConnectionService on shutdown."

am: c5d5c6e1

Change-Id: Iec7d6b7ceba6e93f5c9dbf62e5b204d0ea67e51a
parents d043bb1c c5d5c6e1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -116,6 +116,11 @@ public class HeadsetClientService extends ProfileService {
            Log.w(TAG, "stop() called without start()");
            return false;
        }

        // Stop the HfpClientConnectionService.
        Intent stopIntent = new Intent(this, HfpClientConnectionService.class);
        sHeadsetClientService.stopService(stopIntent);

        setHeadsetClientService(null);

        unregisterReceiver(mBroadcastReceiver);
@@ -128,11 +133,6 @@ public class HeadsetClientService extends ProfileService {
            it.remove();
        }

        // Stop the HfpClientConnectionService.
        Intent stopIntent = new Intent(this, HfpClientConnectionService.class);
        stopIntent.putExtra(HFP_CLIENT_STOP_TAG, true);
        startService(stopIntent);

        // Stop the handler thread
        mSmThread.quit();
        mSmThread = null;