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

Commit 5fadb013 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "McpService: Fix not unregistering AudioManager callback" into main

parents 484c3c69 dbe4060f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ public class MediaPlayerList {
    }

    public void cleanup() {
        mCallback = null;
        mContext.unregisterReceiver(mPackageChangedBroadcastReceiver);

        mActivePlayerId = NO_ACTIVE_PLAYER;
+3 −0
Original line number Diff line number Diff line
@@ -115,6 +115,9 @@ public class McpService extends ProfileService {
        synchronized (mLock) {
            if (getGmcsLocked() == null) {
                // Initialize the Media Control Service Server
                if (mGmcs != null) {
                    mGmcs.cleanup();
                }
                mGmcs = new MediaControlProfile(this);
                // Requires this service to be already started thus we have to make it an async call
                mHandler.post(() -> {