summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Ferrer <javi.f.o@gmail.com>2014-03-23 01:27:02 +0100
committerJavier Ferrer <javi.f.o@gmail.com>2014-03-23 01:27:02 +0100
commit0378c1e7c0d105d51d6326a87ba14b1890338311 (patch)
treef7ce2b5d6e946610ea68ff3903de3cc27449e4c2
parentad3d2a2ae7409faa1a885363b6d97bc9cd705e77 (diff)
downloaddevice_samsung_smdk4412-common-0378c1e7c0d105d51d6326a87ba14b1890338311.tar.gz
device_samsung_smdk4412-common-0378c1e7c0d105d51d6326a87ba14b1890338311.tar.bz2
device_samsung_smdk4412-common-0378c1e7c0d105d51d6326a87ba14b1890338311.zip
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
-rw-r--r--camera/exynos_camera.c8
1 files 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;
+ }
+ }
}