summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Luu <tluu@ti.com>2011-11-10 21:58:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-10 21:58:29 +0000
commit3868fc1f95369d2a9bbe07cc245204be7b01f2f6 (patch)
treed3056286e6dd7137886f1b2823088ba610c9f911
parentbd74ef4ea4745901c9c8ef71f89fa059fb9c3f5b (diff)
parent9a9de0756eba1917410dba8b4328c30c040b9836 (diff)
downloadhardware_ti_omap4-3868fc1f95369d2a9bbe07cc245204be7b01f2f6.zip
hardware_ti_omap4-3868fc1f95369d2a9bbe07cc245204be7b01f2f6.tar.gz
hardware_ti_omap4-3868fc1f95369d2a9bbe07cc245204be7b01f2f6.tar.bz2
am c5831812: am cbaa6646: CameraHAL: Fix preview not starting after surface is abdandoned
* commit 'c58318126fdf0a295987d0d9338f41c80e273431': CameraHAL: Fix preview not starting after surface is abdandoned
-rw-r--r--camera/CameraHal.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp
index 7e18330..8e14fec 100644
--- a/camera/CameraHal.cpp
+++ b/camera/CameraHal.cpp
@@ -1715,10 +1715,11 @@ status_t CameraHal::setPreviewWindow(struct preview_stream_ops *window)
}
}else
{
- /* If mDisplayAdpater is already created. No need to do anything.
- * We get a surface handle directly now, so we can reconfigure surface
- * itself in DisplayAdapter if dimensions have changed
- */
+ // Update the display adapter with the new window that is passed from CameraService
+ ret = mDisplayAdapter->setPreviewWindow(window);
+ if (previewEnabled()) {
+ restartPreview();
+ }
}
LOG_FUNCTION_NAME_EXIT;