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

Commit d414349d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Access AudioPlaybackConfiguration players under mPlayerLock" into udc-qpr-dev

parents 747182ca 5dbcff08
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