summaryrefslogtreecommitdiffstats
path: root/camerawrapper/CameraWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'camerawrapper/CameraWrapper.cpp')
-rw-r--r--camerawrapper/CameraWrapper.cpp8
1 files changed, 7 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)