diff options
author | XpLoDWilD <xplodwild@cyanogenmod.org> | 2013-09-06 11:45:44 +0200 |
---|---|---|
committer | XpLoDWilD <xplod@ouverta.fr> | 2013-09-06 11:53:01 +0200 |
commit | 918238b84247c5e1eb4e1e521b762167647af27b (patch) | |
tree | e01d8fd914530c6d682c1f42d0b248cfc2d53fdc /camera | |
parent | 5db162876e904c3584156f7484332c15d474c8db (diff) | |
download | device_samsung_smdk4412-common-918238b84247c5e1eb4e1e521b762167647af27b.zip device_samsung_smdk4412-common-918238b84247c5e1eb4e1e521b762167647af27b.tar.gz device_samsung_smdk4412-common-918238b84247c5e1eb4e1e521b762167647af27b.tar.bz2 |
camera: Fix camera crashing when bashing shutter
Prevents the picture thread from being restarted or freezing
when it is already started, or when auto-focus is being
done.
Prevents gallery crash.
Change-Id: Ib540f2a47423778b45dfc8df440e33b2ac254ae8
Diffstat (limited to 'camera')
-rw-r--r-- | camera/exynos_camera.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c index e002231..66c9ce3 100644 --- a/camera/exynos_camera.c +++ b/camera/exynos_camera.c @@ -3002,7 +3002,7 @@ int exynos_camera_picture_thread_start(struct exynos_camera *exynos_camera) if (exynos_camera->picture_thread_enabled) { ALOGE("Picture thread was already started!"); - return -1; + return 0; } if (exynos_camera->camera_picture_format) @@ -4034,6 +4034,12 @@ int exynos_camera_take_picture(struct camera_device *dev) exynos_camera = (struct exynos_camera *) dev->priv; + if (exynos_camera->picture_thread_running + || exynos_camera->auto_focus_thread_enabled) + { + return 0; + } + exynos_camera->callback_lock = 1; rc = exynos_camera_picture_thread_start(exynos_camera); exynos_camera->callback_lock = 0; |