From 0378c1e7c0d105d51d6326a87ba14b1890338311 Mon Sep 17 00:00:00 2001 From: Javier Ferrer Date: Sun, 23 Mar 2014 01:27:02 +0100 Subject: smdk4412-common: camera: Don't set focus to FOCUS_MODE_TOUCH after taking a picture After picture has been taken in stock camera app, FocusAreas is resetted to the center of the preview screen, causing the HAL to detect the non (0,0,0,0,0) as a tap in the screen. Change-Id: Id41d108c6bb59a05a0a98efbaef51d14f50741fd --- camera/exynos_camera.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c index 6b6bce3..2335173 100644 --- a/camera/exynos_camera.c +++ b/camera/exynos_camera.c @@ -922,9 +922,13 @@ int exynos_camera_params_apply(struct exynos_camera *exynos_camera, int force) if (rc < 0) ALOGE("%s: Unable to set object y position", __func__); } - } - focus_mode = FOCUS_MODE_TOUCH; + /* After taking a picture, focus-areas is reseted by stock camera app to the center of the screen */ + if (! ( (focus_x == (preview_width / 2)) && (focus_y == (preview_height / 2)) )) { + //ALOGV("%s focus_mode changed to %d due to focus-areas='%s'", __func__, focus_mode, focus_areas_string); + focus_mode = FOCUS_MODE_TOUCH; + } + } } -- cgit v1.2.3