summaryrefslogtreecommitdiffstats
path: root/camera/CameraHal.cpp
diff options
context:
space:
mode:
authorSundar Raman <sunds@ti.com>2011-09-13 08:55:54 -0700
committerIliyan Malchev <malchev@google.com>2011-09-14 16:00:42 -0700
commit1da4a98a2fc97ce823c76ce76880a6936af2743f (patch)
tree171990806e1cf01c742ab203868a4f9c48bba8e9 /camera/CameraHal.cpp
parent791689f507edee5899b5fbb162d33bce8a7febd6 (diff)
downloadhardware_ti_omap4-1da4a98a2fc97ce823c76ce76880a6936af2743f.zip
hardware_ti_omap4-1da4a98a2fc97ce823c76ce76880a6936af2743f.tar.gz
hardware_ti_omap4-1da4a98a2fc97ce823c76ce76880a6936af2743f.tar.bz2
Camera HAL: HomeScreen fix: Check for image cap before exiting stopPreview
stopPreview was returning if just the mDisplayPaused was set. It should go ahead and stop image capture if it is in progress. Also, the setParameter for restoring focus locks will be done as part of stopping the image capture. Change-Id: I1c064ca3c0906faffb507bf2e656259334272304 Signed-off-by: Sundar Raman <sunds@ti.com>
Diffstat (limited to 'camera/CameraHal.cpp')
-rw-r--r--camera/CameraHal.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp
index 5f18341..25147d6 100644
--- a/camera/CameraHal.cpp
+++ b/camera/CameraHal.cpp
@@ -1634,7 +1634,9 @@ void CameraHal::stopPreview()
return;
}
- if(mDisplayPaused)
+ bool imageCaptureRunning = (mCameraAdapter->getState() == CameraAdapter::CAPTURE_STATE) &&
+ (mCameraAdapter->getNextState() != CameraAdapter::PREVIEW_STATE);
+ if(mDisplayPaused && !imageCaptureRunning)
{
// Display is paused, which essentially means there is no preview active.
// Note: this is done so that when stopPreview is called by client after