summaryrefslogtreecommitdiffstats
path: root/camera/ANativeWindowDisplayAdapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'camera/ANativeWindowDisplayAdapter.cpp')
-rw-r--r--camera/ANativeWindowDisplayAdapter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/camera/ANativeWindowDisplayAdapter.cpp b/camera/ANativeWindowDisplayAdapter.cpp
index a7b2e86..e6a4c87 100644
--- a/camera/ANativeWindowDisplayAdapter.cpp
+++ b/camera/ANativeWindowDisplayAdapter.cpp
@@ -269,6 +269,10 @@ int ANativeWindowDisplayAdapter::setPreviewWindow(preview_stream_ops_t* window)
return BAD_VALUE;
}
+ if ( window == mANativeWindow ) {
+ return ALREADY_EXISTS;
+ }
+
///Destroy the existing window object, if it exists
destroy();