Merge "AudioService: fix capture policy restoration" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-07-02 09:21:09 +00:00
committed by Android (Google) Code Review

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) {