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

Commit 9c3d8920 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by android-build-merger
Browse files

AudioPlaybackConfiguration release/death: notify listeners

am: 2a28126a

Change-Id: Id746122af3bc178f20d448e14afd81d8040fc507
parents 13b55002 2a28126a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -267,6 +267,7 @@ public final class PlaybackActivityMonitor

    public void releasePlayer(int piid, int binderUid) {
        if (DEBUG) { Log.v(TAG, "releasePlayer() for piid=" + piid); }
        boolean change = false;
        synchronized(mPlayerLock) {
            final AudioPlaybackConfiguration apc = mPlayers.get(new Integer(piid));
            if (checkConfigurationCaller(piid, apc, binderUid)) {
@@ -275,9 +276,12 @@ public final class PlaybackActivityMonitor
                mPlayers.remove(new Integer(piid));
                mDuckingManager.removeReleased(apc);
                checkVolumeForPrivilegedAlarm(apc, AudioPlaybackConfiguration.PLAYER_STATE_RELEASED);
                apc.handleStateEvent(AudioPlaybackConfiguration.PLAYER_STATE_RELEASED);
                change = apc.handleStateEvent(AudioPlaybackConfiguration.PLAYER_STATE_RELEASED);
            }
        }
        if (change) {
            dispatchPlaybackChange(true /*iplayerreleased*/);
        }
    }

    // Implementation of AudioPlaybackConfiguration.PlayerDeathMonitor