diff options
author | Hochi Huang <hochi.huang@mediatek.com> | 2014-10-09 11:36:22 +0800 |
---|---|---|
committer | leozwang <leozwang@google.com> | 2014-10-14 10:38:08 -0700 |
commit | f53eaf49df1e1e1c01708919e9e0a046543de9b6 (patch) | |
tree | 01274169d31d750a0a0e08c59aa56bd5b84f3ff2 /services/audioflinger | |
parent | e86f4be598b1d2c521e2b3fcd05101c3848e93e2 (diff) | |
download | frameworks_av-f53eaf49df1e1e1c01708919e9e0a046543de9b6.zip frameworks_av-f53eaf49df1e1e1c01708919e9e0a046543de9b6.tar.gz frameworks_av-f53eaf49df1e1e1c01708919e9e0a046543de9b6.tar.bz2 |
fix FM no sound issue
Review: https://partner-android-review.git.corp.google.com/#/c/184276
Signed-off-by: Carson Liao <carson.liao@mediatek.com>
Change-Id: I0847c8a6e6d054a9258b52402c914105d902c573
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/ServiceUtilities.cpp | 7 | ||||
-rw-r--r-- | services/audioflinger/ServiceUtilities.h | 1 |
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(); |