summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camerawrapper/CameraWrapper.cpp8
-rw-r--r--overlay/packages/apps/Camera/res/values/config.xml2
2 files changed, 9 insertions, 1 deletions
diff --git a/camerawrapper/CameraWrapper.cpp b/camerawrapper/CameraWrapper.cpp
index 18f6da2..b6a5c88 100644
--- a/camerawrapper/CameraWrapper.cpp
+++ b/camerawrapper/CameraWrapper.cpp
@@ -322,7 +322,13 @@ int camera_take_picture(struct camera_device * device)
if(!device)
return -EINVAL;
- return VENDOR_CALL(device, take_picture);
+ // We safely avoid returning the exact result of VENDOR_CALL here. If ZSL
+ // really bumps fast, take_picture will be called while a picture is already being
+ // taken, leading to "picture already running" error, crashing Gallery app. Afaik,
+ // there is no issue doing 0 (error appears in logcat anyway if needed).
+ VENDOR_CALL(device, take_picture);
+
+ return 0;
}
int camera_cancel_picture(struct camera_device * device)
diff --git a/overlay/packages/apps/Camera/res/values/config.xml b/overlay/packages/apps/Camera/res/values/config.xml
index 09dd1ad..b04e221 100644
--- a/overlay/packages/apps/Camera/res/values/config.xml
+++ b/overlay/packages/apps/Camera/res/values/config.xml
@@ -26,4 +26,6 @@
<bool name="hasSamsungCamSettings">true</bool>
<!-- Use ZSL mode -->
<bool name="enableZSL">true</bool>
+ <!-- The camera HAL does its own preview state management during snaps -->
+ <bool name="previewStopsDuringSnapshot">true</bool>
</resources>