Skip to content
Commit 55e8fd23 authored by jiabin's avatar jiabin Committed by Nadav Bar
Browse files

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)
parent d9d21afd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment