Merge "AudioService: fix capture policy restoration" into sc-dev am: 0dee554595 am: 51d6a9bcf9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15178916

Change-Id: I7ac0baa64eb6677bb7248e404d250187b7cd08b7
This commit is contained in:
TreeHugger Robot
2021-07-02 10:02:49 +00:00
committed by Automerger Merge Worker

View File

@@ -380,10 +380,12 @@ public final class PlaybackActivityMonitor
}
/**
* Return all cached capture policies.
* Return a copy of all cached capture policies.
*/
public HashMap<Integer, Integer> getAllAllowedCapturePolicies() {
return mAllowedCapturePolicies;
synchronized (mAllowedCapturePolicies) {
return (HashMap<Integer, Integer>) mAllowedCapturePolicies.clone();
}
}
private void updateAllowedCapturePolicy(AudioPlaybackConfiguration apc, int capturePolicy) {