summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraHardwareInterface.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/camera/libcameraservice/CameraHardwareInterface.h')
-rwxr-xr-x[-rw-r--r--]services/camera/libcameraservice/CameraHardwareInterface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h
index 57f923f..9a29e8f 100644..100755
--- a/services/camera/libcameraservice/CameraHardwareInterface.h
+++ b/services/camera/libcameraservice/CameraHardwareInterface.h
@@ -115,6 +115,11 @@ public:
LOGV("%s(%s) buf %p", __FUNCTION__, mName.string(), buf.get());
if (mDevice->ops->set_preview_window) {
+ LOGV("%s buf %p mPreviewWindow %p", __FUNCTION__, buf.get(), mPreviewWindow.get());
+ if (mPreviewWindow.get() && (buf.get() != mPreviewWindow.get())) {
+ mDevice->ops->set_preview_window(mDevice, 0);
+ }
+
mPreviewWindow = buf;
mHalPreviewWindow.user = this;
LOGV("%s &mHalPreviewWindow %p mHalPreviewWindow.user %p", __FUNCTION__,