diff options
author | Jason Sams <> | 2009-03-24 17:58:31 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 17:58:31 -0700 |
commit | 7f1f3bb174263b46dbfa9fa394428ff3d8408308 (patch) | |
tree | 9ff3b3a06ea4c5ee461761c2d6c531a6175d373a /camera | |
parent | cb9a44ed089b9f756f1fda6c9f7994e617138b36 (diff) | |
download | frameworks_base-7f1f3bb174263b46dbfa9fa394428ff3d8408308.zip frameworks_base-7f1f3bb174263b46dbfa9fa394428ff3d8408308.tar.gz frameworks_base-7f1f3bb174263b46dbfa9fa394428ff3d8408308.tar.bz2 |
Automated import from //branches/cupcake/...@141597,141597
Diffstat (limited to 'camera')
-rw-r--r-- | camera/libcameraservice/CameraService.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp index 851b213..c5c95b0 100644 --- a/camera/libcameraservice/CameraService.cpp +++ b/camera/libcameraservice/CameraService.cpp @@ -283,8 +283,14 @@ CameraService::Client::~Client() #endif } - mMediaPlayerBeep.clear(); - mMediaPlayerClick.clear(); + if (mMediaPlayerBeep.get() != NULL) { + mMediaPlayerBeep->disconnect(); + mMediaPlayerBeep.clear(); + } + if (mMediaPlayerClick.get() != NULL) { + mMediaPlayerClick->disconnect(); + mMediaPlayerClick.clear(); + } // make sure we tear down the hardware mClientPid = IPCThreadState::self()->getCallingPid(); @@ -711,9 +717,6 @@ status_t CameraService::Client::takePicture() return INVALID_OPERATION; } - if (mMediaPlayerClick.get() != NULL) { - mMediaPlayerClick->start(); - } return mHardware->takePicture(shutterCallback, yuvPictureCallback, jpegPictureCallback, @@ -751,6 +754,10 @@ void CameraService::Client::shutterCallback(void *user) client->mSurface->registerBuffers(buffers); } + + if (client->mMediaPlayerClick.get() != NULL) { + client->mMediaPlayerClick->start(); + } } // picture callback - raw image ready |