diff options
author | Eric Laurent <elaurent@google.com> | 2014-07-17 10:26:04 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-07-17 10:26:04 -0700 |
commit | 936c84a5b743dce2a2572fdf54b37b187bc88b60 (patch) | |
tree | dcf40715022acc8c80619e431931008c9af69c6f | |
parent | 7b24ee381e806dcb53308c1cafc8a45f4e2d8300 (diff) | |
download | frameworks_av-936c84a5b743dce2a2572fdf54b37b187bc88b60.zip frameworks_av-936c84a5b743dce2a2572fdf54b37b187bc88b60.tar.gz frameworks_av-936c84a5b743dce2a2572fdf54b37b187bc88b60.tar.bz2 |
Revert "sound trigger: added permission checks"
This reverts commit dcb162f3aed807d1e51f29e2454ade584439992e.
-rw-r--r-- | services/soundtrigger/Android.mk | 5 | ||||
-rw-r--r-- | services/soundtrigger/SoundTriggerHwService.cpp | 39 |
2 files changed, 9 insertions, 35 deletions
diff --git a/services/soundtrigger/Android.mk b/services/soundtrigger/Android.mk index 51eb845..b7ccaab 100644 --- a/services/soundtrigger/Android.mk +++ b/services/soundtrigger/Android.mk @@ -33,11 +33,8 @@ LOCAL_SHARED_LIBRARIES:= \ libhardware \ libsoundtrigger -LOCAL_STATIC_LIBRARIES := \ - libserviceutility +#LOCAL_C_INCLUDES += \ -LOCAL_C_INCLUDES += \ - $(TOPDIR)frameworks/av/services/audioflinger LOCAL_MODULE:= libsoundtriggerservice diff --git a/services/soundtrigger/SoundTriggerHwService.cpp b/services/soundtrigger/SoundTriggerHwService.cpp index 3654136..747af79 100644 --- a/services/soundtrigger/SoundTriggerHwService.cpp +++ b/services/soundtrigger/SoundTriggerHwService.cpp @@ -22,18 +22,18 @@ #include <sys/types.h> #include <pthread.h> -#include <system/sound_trigger.h> -#include <cutils/atomic.h> -#include <cutils/properties.h> -#include <utils/Errors.h> -#include <utils/Log.h> #include <binder/IServiceManager.h> #include <binder/MemoryBase.h> #include <binder/MemoryHeapBase.h> +#include <cutils/atomic.h> +#include <cutils/properties.h> #include <hardware/hardware.h> -#include <hardware/sound_trigger.h> -#include <ServiceUtilities.h> +#include <utils/Errors.h> +#include <utils/Log.h> + #include "SoundTriggerHwService.h" +#include <system/sound_trigger.h> +#include <hardware/sound_trigger.h> namespace android { @@ -103,10 +103,6 @@ status_t SoundTriggerHwService::listModules(struct sound_trigger_module_descript uint32_t *numModules) { ALOGV("listModules"); - if (!captureHotwordAllowed()) { - return PERMISSION_DENIED; - } - AutoMutex lock(mServiceLock); if (numModules == NULL || (*numModules != 0 && modules == NULL)) { return BAD_VALUE; @@ -124,10 +120,6 @@ status_t SoundTriggerHwService::attach(const sound_trigger_module_handle_t handl sp<ISoundTrigger>& moduleInterface) { ALOGV("attach module %d", handle); - if (!captureHotwordAllowed()) { - return PERMISSION_DENIED; - } - AutoMutex lock(mServiceLock); moduleInterface.clear(); if (client == 0) { @@ -147,8 +139,8 @@ status_t SoundTriggerHwService::attach(const sound_trigger_module_handle_t handl } void SoundTriggerHwService::detachModule(sp<Module> module) { - ALOGV("detachModule"); AutoMutex lock(mServiceLock); + ALOGV("detachModule"); module->clearClient(); } @@ -318,9 +310,6 @@ SoundTriggerHwService::Module::~Module() { void SoundTriggerHwService::Module::detach() { ALOGV("detach()"); - if (!captureHotwordAllowed()) { - return; - } { AutoMutex lock(mLock); for (size_t i = 0; i < mModels.size(); i++) { @@ -348,9 +337,6 @@ status_t SoundTriggerHwService::Module::loadSoundModel(const sp<IMemory>& modelM sound_model_handle_t *handle) { ALOGV("loadSoundModel() handle"); - if (!captureHotwordAllowed()) { - return PERMISSION_DENIED; - } if (modelMemory == 0 || modelMemory->pointer() == NULL) { ALOGE("loadSoundModel() modelMemory is 0 or has NULL pointer()"); @@ -375,9 +361,6 @@ status_t SoundTriggerHwService::Module::loadSoundModel(const sp<IMemory>& modelM status_t SoundTriggerHwService::Module::unloadSoundModel(sound_model_handle_t handle) { ALOGV("unloadSoundModel() model handle %d", handle); - if (!captureHotwordAllowed()) { - return PERMISSION_DENIED; - } AutoMutex lock(mLock); ssize_t index = mModels.indexOfKey(handle); @@ -397,9 +380,6 @@ status_t SoundTriggerHwService::Module::startRecognition(sound_model_handle_t ha const sp<IMemory>& dataMemory) { ALOGV("startRecognition() model handle %d", handle); - if (!captureHotwordAllowed()) { - return PERMISSION_DENIED; - } if (dataMemory != 0 && dataMemory->pointer() == NULL) { ALOGE("startRecognition() dataMemory is non-0 but has NULL pointer()"); @@ -435,9 +415,6 @@ status_t SoundTriggerHwService::Module::startRecognition(sound_model_handle_t ha status_t SoundTriggerHwService::Module::stopRecognition(sound_model_handle_t handle) { ALOGV("stopRecognition() model handle %d", handle); - if (!captureHotwordAllowed()) { - return PERMISSION_DENIED; - } AutoMutex lock(mLock); sp<Model> model = getModel(handle); |