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

Commit 20482be0 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by Gerrit Code Review
Browse files

Merge "Stop HfpClientConnectionService on shutdown."

parents f56043d7 22371f9b
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;