summaryrefslogtreecommitdiffstats
path: root/services/camera
diff options
context:
space:
mode:
authorOleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com>2015-09-14 11:00:33 +0200
committerKeith Mok <kmok@cyngn.com>2015-11-17 12:22:51 -0800
commit980a04afdce28a6c6159d31864967ded86815c7b (patch)
tree54d81cea49c1040dffaf61afe15939f580dc2111 /services/camera
parent842f7df253913a11b6dbc705b83299c437edd4e3 (diff)
downloadframeworks_av-980a04afdce28a6c6159d31864967ded86815c7b.zip
frameworks_av-980a04afdce28a6c6159d31864967ded86815c7b.tar.gz
frameworks_av-980a04afdce28a6c6159d31864967ded86815c7b.tar.bz2
Fix setTorchMode support for the old HAL version
CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice when torch is disabled. This closes connection to the camera module, but mDevice instance is kept and variable is non-NULL which will prevent connection next time torch is going to be enabled. Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
Diffstat (limited to 'services/camera')
-rw-r--r--services/camera/libcameraservice/CameraFlashlight.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraFlashlight.cpp b/services/camera/libcameraservice/CameraFlashlight.cpp
index fd23ef9..406c1c4 100644
--- a/services/camera/libcameraservice/CameraFlashlight.cpp
+++ b/services/camera/libcameraservice/CameraFlashlight.cpp
@@ -882,6 +882,7 @@ status_t CameraHardwareInterfaceFlashControl::disconnectCameraDevice() {
}
mDevice->setPreviewWindow(NULL);
mDevice->release();
+ mDevice = NULL;
return OK;
}