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

Commit 771eb8b1 authored by Joseph Pirozzo's avatar Joseph Pirozzo Committed by android-build-merger
Browse files

Merge "Stop HfpClientConnectionService on shutdown." am: c5d5c6e1

am: 36d00dea

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

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

        setHeadsetClientService(null);
        setHeadsetClientService(null);


        unregisterReceiver(mBroadcastReceiver);
        unregisterReceiver(mBroadcastReceiver);
@@ -128,11 +133,6 @@ public class HeadsetClientService extends ProfileService {
            it.remove();
            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
        // Stop the handler thread
        mSmThread.quit();
        mSmThread.quit();
        mSmThread = null;
        mSmThread = null;