audio policy: update permission check for REMOTE_SUBMIX audio source.
Do not request RECORD_AUDIO permission when capturing from audio source REMOTE_SUBMIX as this is not capturing from an actual microphone but from a redirection if the audio output instead. Now enforce either MODIFY_AUDIO_ROUTING (aligned with dynamic audio policy registration). Also fix a similar issue with audio source ECHO_REFERENCE where RECORD_AUDIO permission was requested in addition to CAPTURE_AUDIO_OUTPUT. Bug: 186581697 Test: GTS AudioCaptureTest#testFixedVolumeRemoteSubmixSetup, RemoteSubmixTest#testRecordFromRemoteSubmix, AudioPolicyTest Test: CTS AudioRecordTest#testRestrictedAudioSourcePermissions, NoCaptureAudioOutputPermissionTest#testCreateAudioRecord, AudioPlaybackCaptureTest Change-Id: Icfaa60af99bb5813ec4572e092c94a94090b7d8d
Loading
Please register or sign in to comment