Permalink
Browse files

Forward Port: Add Camera sound toggle [3/3]

Change-Id: I3ac951967f8403252c7f944fcbde927ee75608e6
  • Loading branch information...
mnm9994u authored and xlxfoxxlx committed Nov 29, 2014
1 parent 66b410a commit dac1f8bc008239b50f6d0b94bca3a64eb6473036
Showing with 13 additions and 3 deletions.
  1. +13 −3 services/camera/libcameraservice/CameraService.cpp
@@ -1989,9 +1989,19 @@ void CameraService::loadSound() {
LOG1("CameraService::loadSound ref=%d", mSoundRef);
if (mSoundRef++) return;
mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg");
mSoundPlayer[SOUND_RECORDING_START] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg");
mSoundPlayer[SOUND_RECORDING_STOP] = newMediaPlayer("/system/media/audio/ui/VideoStop.ogg");
char value[PROPERTY_VALUE_MAX];
property_get("persist.sys.camera-sound", value, "1");
if (atoi(value)) {
mSoundPlayer[SOUND_SHUTTER] = newMediaPlayer("/system/media/audio/ui/camera_click.ogg");
mSoundPlayer[SOUND_RECORDING_START] = newMediaPlayer("/system/media/audio/ui/VideoRecord.ogg");
mSoundPlayer[SOUND_RECORDING_STOP] = newMediaPlayer("/system/media/audio/ui/VideoStop.ogg");
} else {
mSoundPlayer[SOUND_SHUTTER] = NULL;
mSoundPlayer[SOUND_RECORDING_START] = NULL;
mSoundPlayer[SOUND_RECORDING_STOP] = NULL;
}
}
void CameraService::releaseSound() {

0 comments on commit dac1f8b

Please sign in to comment.