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

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

AudioPlaybackConfiguration release/death: notify listeners am: 2a28126a

am: 9c3d8920

Change-Id: I38b630f8622b3efc1c9b4e1cc5a7bd6ac71f9a30
parents 9f359cc2 9c3d8920
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