From 940b28bc37f819c62386e393614354f55069e8f6 Mon Sep 17 00:00:00 2001 From: Scott Mertz Date: Wed, 6 Jul 2016 10:18:52 -0700 Subject: Enforce permission for accessing fm tuner Change-Id: I13f3ba8fc9caaeee21597a2405a8c3629e985502 --- services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp') diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp index f0be341..b23c35e 100644 --- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp +++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp @@ -316,6 +316,11 @@ status_t AudioPolicyService::getInputForAttr(const audio_attributes_t *attr, if ((attr->source == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) { return BAD_VALUE; } + + if ((attr->source == AUDIO_SOURCE_FM_TUNER) && !accessFmRadioAllowed()) { + return BAD_VALUE; + } + spaudioPolicyEffects; status_t status; AudioPolicyInterface::input_type_t inputType; -- cgit v1.1