Loading services/camera/libcameraservice/CameraService.cpp +14 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ #include "gralloc_priv.h" #endif #include <cutils/properties.h> namespace android { // ---------------------------------------------------------------------------- Loading Loading @@ -336,9 +338,19 @@ void CameraService::loadSound() { LOG1("CameraService::loadSound ref=%d", mSoundRef); if (mSoundRef++) return; char value[PROPERTY_VALUE_MAX]; property_get("persist.camera.shutter.disable", value, "0"); int disableSound = atoi(value); if(!disableSound) { mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); } else { mSoundPlayer[SOUND_SHUTTER] = NULL; mSoundPlayer[SOUND_RECORDING] = NULL; } } void CameraService::releaseSound() { Mutex::Autolock lock(mSoundLock); Loading Loading
services/camera/libcameraservice/CameraService.cpp +14 −2 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ #include "gralloc_priv.h" #endif #include <cutils/properties.h> namespace android { // ---------------------------------------------------------------------------- Loading Loading @@ -336,9 +338,19 @@ void CameraService::loadSound() { LOG1("CameraService::loadSound ref=%d", mSoundRef); if (mSoundRef++) return; char value[PROPERTY_VALUE_MAX]; property_get("persist.camera.shutter.disable", value, "0"); int disableSound = atoi(value); if(!disableSound) { mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg"); mSoundPlayer[SOUND_RECORDING] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg"); } else { mSoundPlayer[SOUND_SHUTTER] = NULL; mSoundPlayer[SOUND_RECORDING] = NULL; } } void CameraService::releaseSound() { Mutex::Autolock lock(mSoundLock); Loading