Set/get allowed capture policy via AudioService.
Do not call AudioSystem.setAllowedCapturePolicy directly in AudioManager. Instead, send the request to AudioService and calling the function in AudioService. In that case, AudioService can cached the request so that it benefits returning correct playback configuration. When querying capture policy, AudioManager will query AudioService first to see if there is cached capture policy. If there is exception, return cached capture policy in AudioManager. Test: dumpsys audio, query active audio playback configuration Test: atest AudioManagerTest, AudioAttributesTest Test: atest AudioPlaybackCaptureTest, AudioPlaybackConfigurationTest Bug: 145115448 Change-Id: I170571d8a67839bc5a53991d6c89127b99b5c794 Merged-In: I170571d8a67839bc5a53991d6c89127b99b5c794 (cherry picked from commit b33f3697)
Loading
Please register or sign in to comment