summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXpLoDWilD <xplodgui@gmail.com>2012-12-11 22:08:31 +0000
committerXpLoDWilD <xplodgui@gmail.com>2012-12-11 22:22:26 +0000
commit95577f87b005857b47f4e74e4d9a4a1d3ed778ea (patch)
treea6cc854d7fbf41b39e79ba984a6018dda051045b
parent4f0295469dd6064effb701ea7c47432297589f3f (diff)
downloaddevice_samsung_smdk4412-common-95577f87b005857b47f4e74e4d9a4a1d3ed778ea.zip
device_samsung_smdk4412-common-95577f87b005857b47f4e74e4d9a4a1d3ed778ea.tar.gz
device_samsung_smdk4412-common-95577f87b005857b47f4e74e4d9a4a1d3ed778ea.tar.bz2
smdk4412-common: camera: Enable preview handling, and don't report take_picture errors
See CameraWrapper::camera_take_picture comments Change-Id: I3255424dd946b1134fdf0cf6539cc73bc9b40bcf
-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>