Merge "Access AudioPlaybackConfiguration players under mPlayerLock" into udc-qpr-dev am: d414349d4e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24233633 Change-Id: I9c19c6279383b4c12d1149006453c9d0eabb2eab Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -989,21 +989,16 @@ 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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user