From a73ebf03d722d965fc9b394bba2187a66559949f Mon Sep 17 00:00:00 2001 From: Wu-cheng Li Date: Tue, 12 Oct 2010 17:34:57 +0800 Subject: Do not call autoFocus in fixed and EDOF focus modes. bug:3088128 Change-Id: I9ee656072449b7b900ba03d2afd2ff9ffd9867e0 --- src/com/android/camera/Camera.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index fc16f16..c9c7394 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -1512,6 +1512,8 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, // can take the photo right away. If the focus mode is infinity, we can // also take the photo. if (mFocusMode.equals(Parameters.FOCUS_MODE_INFINITY) + || mFocusMode.equals(Parameters.FOCUS_MODE_FIXED) + || mFocusMode.equals(Parameters.FOCUS_MODE_EDOF) || (mFocusState == FOCUS_SUCCESS || mFocusState == FOCUS_FAIL)) { mImageCapture.onSnap(); @@ -1528,7 +1530,9 @@ public class Camera extends NoSearchActivity implements View.OnClickListener, private void doFocus(boolean pressed) { // Do the focus if the mode is not infinity. if (mHeadUpDisplay.collapse()) return; - if (!mFocusMode.equals(Parameters.FOCUS_MODE_INFINITY)) { + if (!(mFocusMode.equals(Parameters.FOCUS_MODE_INFINITY) + || mFocusMode.equals(Parameters.FOCUS_MODE_FIXED) + || mFocusMode.equals(Parameters.FOCUS_MODE_EDOF))) { if (pressed) { // Focus key down. autoFocus(); } else { // Focus key up. -- cgit v1.1