summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-04-13 22:43:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-13 22:43:07 +0000
commit221a33890fa8b3c3c43c94327305b8e7717c412f (patch)
tree6953a583833355b48db57da5d3a326e505f96aaa /services
parentdb93079daf06a94e50622d0383b9ed8e767e2f92 (diff)
parentab300c8cbf5df98fddca39e8d1698b0307432152 (diff)
downloadframeworks_av-221a33890fa8b3c3c43c94327305b8e7717c412f.zip
frameworks_av-221a33890fa8b3c3c43c94327305b8e7717c412f.tar.gz
frameworks_av-221a33890fa8b3c3c43c94327305b8e7717c412f.tar.bz2
Merge "audio polciy: remove FM audio capture permission."
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/ServiceUtilities.cpp7
-rw-r--r--services/audioflinger/ServiceUtilities.h1
-rw-r--r--services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp3
-rw-r--r--services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp3
4 files changed, 2 insertions, 12 deletions
diff --git a/services/audioflinger/ServiceUtilities.cpp b/services/audioflinger/ServiceUtilities.cpp
index fae19a1..8246fef 100644
--- a/services/audioflinger/ServiceUtilities.cpp
+++ b/services/audioflinger/ServiceUtilities.cpp
@@ -50,13 +50,6 @@ bool captureHotwordAllowed() {
return ok;
}
-bool captureFmTunerAllowed() {
- static const String16 sCaptureFmTunerAllowed("android.permission.ACCESS_FM_RADIO");
- bool ok = checkCallingPermission(sCaptureFmTunerAllowed);
- if (!ok) ALOGE("android.permission.ACCESS_FM_RADIO");
- return ok;
-}
-
bool settingsAllowed() {
if (getpid_cached == IPCThreadState::self()->getCallingPid()) return true;
static const String16 sAudioSettings("android.permission.MODIFY_AUDIO_SETTINGS");
diff --git a/services/audioflinger/ServiceUtilities.h b/services/audioflinger/ServiceUtilities.h
index ce18a90..df6f6f4 100644
--- a/services/audioflinger/ServiceUtilities.h
+++ b/services/audioflinger/ServiceUtilities.h
@@ -23,7 +23,6 @@ extern pid_t getpid_cached;
bool recordingAllowed();
bool captureAudioOutputAllowed();
bool captureHotwordAllowed();
-bool captureFmTunerAllowed();
bool settingsAllowed();
bool modifyAudioRoutingAllowed();
bool dumpAllowed();
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
index a763151..9510727 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp
@@ -262,8 +262,7 @@ status_t AudioPolicyService::getInputForAttr(const audio_attributes_t *attr,
return BAD_VALUE;
}
- if (((attr->source == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) ||
- ((attr->source == AUDIO_SOURCE_FM_TUNER) && !captureFmTunerAllowed())) {
+ if ((attr->source == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) {
return BAD_VALUE;
}
sp<AudioPolicyEffects>audioPolicyEffects;
diff --git a/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp b/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
index 372a9fa..e4ca5dc 100644
--- a/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
+++ b/services/audiopolicy/service/AudioPolicyInterfaceImplLegacy.cpp
@@ -255,8 +255,7 @@ status_t AudioPolicyService::getInputForAttr(const audio_attributes_t *attr,
inputSource = AUDIO_SOURCE_MIC;
}
- if (((inputSource == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) ||
- ((inputSource == AUDIO_SOURCE_FM_TUNER) && !captureFmTunerAllowed())) {
+ if ((inputSource == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) {
return BAD_VALUE;
}