diff options
author | Nipun Kwatra <nkwatra@google.com> | 2010-09-14 16:49:08 -0700 |
---|---|---|
committer | Nipun Kwatra <nkwatra@google.com> | 2010-09-14 16:49:08 -0700 |
commit | 4e94c30ed5ddb79b168291b28bfad79eaed022ed (patch) | |
tree | 68da325f20f2d0e02e40afaa72da5b25169cf0da | |
parent | 088146a4213f5099b8fcc93e1b75538c53f61404 (diff) | |
download | frameworks_base-4e94c30ed5ddb79b168291b28bfad79eaed022ed.zip frameworks_base-4e94c30ed5ddb79b168291b28bfad79eaed022ed.tar.gz frameworks_base-4e94c30ed5ddb79b168291b28bfad79eaed022ed.tar.bz2 |
Added command type to play recording sound.
Added CAMERA_CMD_PLAY_RECORDING_SOUND command type to play recording
sound through sendCommand. This is currently needed by time lapse
recording using still mode capture, which disables the shutter sound
but needs to play the recording sound.
Change-Id: I376aa40f45b6064fd862abc065456b06fc338020
-rw-r--r-- | include/camera/Camera.h | 3 | ||||
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h index 9ba5b3d..f7b3b42 100644 --- a/include/camera/Camera.h +++ b/include/camera/Camera.h @@ -87,6 +87,9 @@ enum { // In sendCommand passing arg1 = 0 will disable, // while passing arg1 = 1 will enable the shutter sound. CAMERA_CMD_ENABLE_SHUTTER_SOUND = 4, + + // cmdType to play recording sound. + CAMERA_CMD_PLAY_RECORDING_SOUND = 5, }; // camera fatal errors diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 355763e..f943a10 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -840,6 +840,8 @@ status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t a return BAD_VALUE; } return OK; + } else if (cmd == CAMERA_CMD_PLAY_RECORDING_SOUND) { + mCameraService->playSound(SOUND_RECORDING); } return mHardware->sendCommand(cmd, arg1, arg2); |