diff options
Diffstat (limited to 'services/audiopolicy/AudioPolicyClientImplLegacy.cpp')
-rw-r--r-- | services/audiopolicy/AudioPolicyClientImplLegacy.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/audiopolicy/AudioPolicyClientImplLegacy.cpp b/services/audiopolicy/AudioPolicyClientImplLegacy.cpp index 97719da..a79f8ae 100644 --- a/services/audiopolicy/AudioPolicyClientImplLegacy.cpp +++ b/services/audiopolicy/AudioPolicyClientImplLegacy.cpp @@ -188,6 +188,13 @@ static audio_io_handle_t open_input(audio_module_handle_t module, if (pSamplingRate == NULL || pFormat == NULL || pChannelMask == NULL || pDevices == NULL) { return AUDIO_IO_HANDLE_NONE; } + + if (((*pDevices & AUDIO_DEVICE_IN_REMOTE_SUBMIX) == AUDIO_DEVICE_IN_REMOTE_SUBMIX) + && !captureAudioOutputAllowed()) { + ALOGE("open_input() permission denied: capture not allowed"); + return AUDIO_IO_HANDLE_NONE; + } + audio_config_t config = AUDIO_CONFIG_INITIALIZER;; config.sample_rate = *pSamplingRate; config.format = *pFormat; |