diff options
| author | Eino-Ville Talvala <etalvala@google.com> | 2012-10-08 22:25:29 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-08 22:25:29 -0700 |
| commit | 03d630b6360aada1df89bd0d4a81eefe145f5514 (patch) | |
| tree | 328cc3c3c493def61e81f3d0a297b5edc48681cf /services | |
| parent | cf6eb207f21a3cbf4da91273c16c5dab04b2d824 (diff) | |
| parent | 843aba43ef85f5a40db03e0f384ed096b03592d0 (diff) | |
| download | frameworks_av-03d630b6360aada1df89bd0d4a81eefe145f5514.zip frameworks_av-03d630b6360aada1df89bd0d4a81eefe145f5514.tar.gz frameworks_av-03d630b6360aada1df89bd0d4a81eefe145f5514.tar.bz2 | |
am 843aba43: am 2458d482: Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev
* commit '843aba43ef85f5a40db03e0f384ed096b03592d0':
Camera2: Always disconnect in the client destructor
Diffstat (limited to 'services')
| -rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 6fbd6ed..124d24d 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -409,6 +409,9 @@ CameraService::Client::Client(const sp<CameraService>& cameraService, // tear down the client CameraService::Client::~Client() { mCameraService->releaseSound(); + + // unconditionally disconnect. function is idempotent + Client::disconnect(); } // ---------------------------------------------------------------------------- @@ -433,6 +436,7 @@ CameraService::Client* CameraService::Client::getClientFromCookie(void* user) { return client; } +// NOTE: function is idempotent void CameraService::Client::disconnect() { mCameraService->removeClient(mCameraClient); mCameraService->setCameraFree(mCameraId); |
