summaryrefslogtreecommitdiffstats
path: root/camera/libcameraservice
diff options
context:
space:
mode:
authorJason Sams <>2009-03-24 17:58:31 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 17:58:31 -0700
commit4d45243ceac53b611c500be9408cff341ab8edbf (patch)
tree1a39d9773aa06cc67aeba672045409909ea403bd /camera/libcameraservice
parent0c2bcbc6cc2c41c567596e1579adae64570e9aad (diff)
downloadframeworks_native-4d45243ceac53b611c500be9408cff341ab8edbf.zip
frameworks_native-4d45243ceac53b611c500be9408cff341ab8edbf.tar.gz
frameworks_native-4d45243ceac53b611c500be9408cff341ab8edbf.tar.bz2
Automated import from //branches/cupcake/...@141597,141597
Diffstat (limited to 'camera/libcameraservice')
-rw-r--r--camera/libcameraservice/CameraService.cpp17
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