diff options
author | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2012-12-12 07:42:11 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2012-12-12 07:42:11 -0800 |
commit | 1fa2ca3c7cba1688160db60c9038345a3b78fb73 (patch) | |
tree | f4ad69357fae70d1506956792bbf5df8bfdaab56 | |
parent | aa566dee3eba6c80d40fc356055799db1f2f8b57 (diff) | |
parent | 95577f87b005857b47f4e74e4d9a4a1d3ed778ea (diff) | |
download | device_samsung_smdk4412-common-1fa2ca3c7cba1688160db60c9038345a3b78fb73.zip device_samsung_smdk4412-common-1fa2ca3c7cba1688160db60c9038345a3b78fb73.tar.gz device_samsung_smdk4412-common-1fa2ca3c7cba1688160db60c9038345a3b78fb73.tar.bz2 |
Merge "smdk4412-common: camera: Enable preview handling, and don't report take_picture errors" into mr1-staging
-rw-r--r-- | camerawrapper/CameraWrapper.cpp | 8 | ||||
-rw-r--r-- | overlay/packages/apps/Camera/res/values/config.xml | 2 |
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> |