Merge "Access AudioPlaybackConfiguration players under mPlayerLock" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d414349d4e
@@ -989,21 +989,16 @@ public final class PlaybackActivityMonitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<AudioPlaybackConfiguration> getActivePlaybackConfigurations(boolean isPrivileged) {
|
List<AudioPlaybackConfiguration> getActivePlaybackConfigurations(boolean isPrivileged) {
|
||||||
synchronized(mPlayers) {
|
synchronized (mPlayerLock) {
|
||||||
if (isPrivileged) {
|
if (isPrivileged) {
|
||||||
return new ArrayList<AudioPlaybackConfiguration>(mPlayers.values());
|
return new ArrayList<AudioPlaybackConfiguration>(mPlayers.values());
|
||||||
} else {
|
} else {
|
||||||
final List<AudioPlaybackConfiguration> configsPublic;
|
return anonymizeForPublicConsumption(
|
||||||
synchronized (mPlayerLock) {
|
|
||||||
configsPublic = anonymizeForPublicConsumption(
|
|
||||||
new ArrayList<AudioPlaybackConfiguration>(mPlayers.values()));
|
new ArrayList<AudioPlaybackConfiguration>(mPlayers.values()));
|
||||||
}
|
|
||||||
return configsPublic;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inner class to track clients that want to be notified of playback updates
|
* Inner class to track clients that want to be notified of playback updates
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user