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

Commit 3c4c26d3 authored by Shunkai Yao's avatar Shunkai Yao Committed by Android (Google) Code Review
Browse files

Merge "Access AudioPlaybackConfiguration players under mPlayerLock" into main

parents 4dac9306 b89353ba
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -989,20 +989,15 @@ public final class PlaybackActivityMonitor
    }

    List<AudioPlaybackConfiguration> getActivePlaybackConfigurations(boolean isPrivileged) {
        synchronized(mPlayers) {
        synchronized (mPlayerLock) {
            if (isPrivileged) {
                return new ArrayList<AudioPlaybackConfiguration>(mPlayers.values());
            } else {
                final List<AudioPlaybackConfiguration> configsPublic;
                synchronized (mPlayerLock) {
                    configsPublic = anonymizeForPublicConsumption(
                return anonymizeForPublicConsumption(
                            new ArrayList<AudioPlaybackConfiguration>(mPlayers.values()));
            }
                return configsPublic;
        }
    }
    }


    /**
     * Inner class to track clients that want to be notified of playback updates