summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorHochi Huang <hochi.huang@mediatek.com>2014-10-15 02:05:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-15 02:05:40 +0000
commit45dabe92022c24da53ce47efcdbef14d59ce28f2 (patch)
treebca2472d6d09b5134f097966632e285488849041 /services/audioflinger
parentb1c8f2200e3f1bc5d5448ade52dfc8a6d66cca27 (diff)
parent30fa3068b8664043f26108e4f0cb88de21c425c4 (diff)
downloadframeworks_av-45dabe92022c24da53ce47efcdbef14d59ce28f2.zip
frameworks_av-45dabe92022c24da53ce47efcdbef14d59ce28f2.tar.gz
frameworks_av-45dabe92022c24da53ce47efcdbef14d59ce28f2.tar.bz2
am 30fa3068: am f53eaf49: fix FM no sound issue
* commit '30fa3068b8664043f26108e4f0cb88de21c425c4': fix FM no sound issue
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/ServiceUtilities.cpp7
-rw-r--r--services/audioflinger/ServiceUtilities.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/services/audioflinger/ServiceUtilities.cpp b/services/audioflinger/ServiceUtilities.cpp
index 8246fef..fae19a1 100644
--- a/services/audioflinger/ServiceUtilities.cpp
+++ b/services/audioflinger/ServiceUtilities.cpp
@@ -50,6 +50,13 @@ 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 df6f6f4..ce18a90 100644
--- a/services/audioflinger/ServiceUtilities.h
+++ b/services/audioflinger/ServiceUtilities.h
@@ -23,6 +23,7 @@ extern pid_t getpid_cached;
bool recordingAllowed();
bool captureAudioOutputAllowed();
bool captureHotwordAllowed();
+bool captureFmTunerAllowed();
bool settingsAllowed();
bool modifyAudioRoutingAllowed();
bool dumpAllowed();