diff options
author | Steve Kondik <shade@chemlab.org> | 2010-12-14 05:38:09 -0500 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-12-14 05:38:09 -0500 |
commit | 42d63ad24c833cb63658de246d4953df24671a63 (patch) | |
tree | 02ce866fe82aae0a877df08addcc3f4c1a21f400 | |
parent | dc1bd26ea64eb4444be4e35062afd17d168c8959 (diff) | |
download | frameworks_base-42d63ad24c833cb63658de246d4953df24671a63.zip frameworks_base-42d63ad24c833cb63658de246d4953df24671a63.tar.gz frameworks_base-42d63ad24c833cb63658de246d4953df24671a63.tar.bz2 |
libcameraservice: Remove references to playShutterSoundOnly
Removing cruft from a CAF patch. This fixes the shutter sound.
Change-Id: Ibefb50e7404a8a73336ae055ca0f6e815aed909b
-rw-r--r-- | camera/libcameraservice/CameraService.cpp | 35 | ||||
-rw-r--r-- | camera/libcameraservice/CameraService.h | 2 |
2 files changed, 15 insertions, 22 deletions
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp index 738821c..b9bf5f8 100644 --- a/camera/libcameraservice/CameraService.cpp +++ b/camera/libcameraservice/CameraService.cpp @@ -985,39 +985,32 @@ status_t CameraService::Client::takePicture() // snapshot taken void CameraService::Client::handleShutter( - image_rect_type *size, // The width and height of yuv picture for + image_rect_type *size // The width and height of yuv picture for // registerBuffer. If this is NULL, use the picture // size from parameters. - bool playShutterSoundOnly ) { // Play shutter sound. - - if(playShutterSoundOnly) { - - if (mMediaPlayerClick.get() != NULL) { - // do not play shutter sound if stream volume is 0 - // (typically because ringer mode is silent). - int index; - AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index); - if (index != 0) { - mMediaPlayerClick->seekTo(0); - mMediaPlayerClick->start(); - } - } - sp<ICameraClient> c = mCameraClient; - if (c != NULL) { - c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0); + if (mMediaPlayerClick.get() != NULL) { + // do not play shutter sound if stream volume is 0 + // (typically because ringer mode is silent). + int index; + AudioSystem::getStreamVolumeIndex(AudioSystem::ENFORCED_AUDIBLE, &index); + if (index != 0) { + mMediaPlayerClick->seekTo(0); + mMediaPlayerClick->start(); } - return ; } - // Screen goes black after the buffer is unregistered. if (mSurface != 0 && !mUseOverlay) { mSurface->unregisterBuffers(); } + sp<ICameraClient> c = mCameraClient; + if (c != NULL) { + c->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0); + } mHardware->disableMsgType(CAMERA_MSG_SHUTTER); // It takes some time before yuvPicture callback to be called. @@ -1192,7 +1185,7 @@ void CameraService::Client::notifyCallback(int32_t msgType, int32_t ext1, int32_ switch (msgType) { case CAMERA_MSG_SHUTTER: // ext1 is the dimension of the yuv picture. - client->handleShutter((image_rect_type *)ext1, (bool)ext2); + client->handleShutter((image_rect_type *)ext1); break; default: sp<ICameraClient> c = client->mCameraClient; diff --git a/camera/libcameraservice/CameraService.h b/camera/libcameraservice/CameraService.h index 08dae31..95d11b4 100644 --- a/camera/libcameraservice/CameraService.h +++ b/camera/libcameraservice/CameraService.h @@ -150,7 +150,7 @@ private: static sp<Client> getClientFromCookie(void* user); void handlePreviewData(const sp<IMemory>&); - void handleShutter(image_rect_type *image, bool playShutterSoundOnly); + void handleShutter(image_rect_type *image); void handlePostview(const sp<IMemory>&); void handleRawPicture(const sp<IMemory>&); void handleCompressedPicture(const sp<IMemory>&); |