diff options
| author | Wei Huang <weih@google.com> | 2011-10-05 13:38:34 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-10-05 13:38:34 -0700 |
| commit | 1ea2431debf771dd6d8a31b7945cedad332c102e (patch) | |
| tree | 04649b023407a53511e6a20abf90c96d7a6585a6 | |
| parent | 7f1b0d66edd09a4cb218ecc1255a8d48f5c18a60 (diff) | |
| parent | a7a50a45c75585e350eb730574b1e531468e8b18 (diff) | |
| download | LegacyCamera-1ea2431debf771dd6d8a31b7945cedad332c102e.zip LegacyCamera-1ea2431debf771dd6d8a31b7945cedad332c102e.tar.gz LegacyCamera-1ea2431debf771dd6d8a31b7945cedad332c102e.tar.bz2 | |
Merge "Always show gray focus indicator in continuous autofocus mode."
| -rw-r--r-- | src/com/android/camera/FocusManager.java | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/com/android/camera/FocusManager.java b/src/com/android/camera/FocusManager.java index 2ab37ad..f1b26fb 100644 --- a/src/com/android/camera/FocusManager.java +++ b/src/com/android/camera/FocusManager.java @@ -187,7 +187,11 @@ public class FocusManager { // take the picture now. if (focused) { mState = STATE_SUCCESS; - if (mFocusToneGenerator != null) { + // Do not play the sound in continuous autofocus mode. It does + // not do a full scan. The focus callback arrives before doSnap + // so the state is always STATE_FOCUSING. + if (!Parameters.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusMode) + && mFocusToneGenerator != null) { mFocusToneGenerator.startTone(ToneGenerator.TONE_PROP_BEEP2); } } else { @@ -386,10 +390,17 @@ public class FocusManager { } } else if (mState == STATE_FOCUSING || mState == STATE_FOCUSING_SNAP_ON_FINISH) { focusIndicator.showStart(); - } else if (mState == STATE_SUCCESS) { - focusIndicator.showSuccess(); - } else if (mState == STATE_FAIL) { - focusIndicator.showFail(); + } else { + // In CAF, do not show success or failure because it only returns + // the focus status. It does not do a full scan. So the result is + // failure most of the time. + if (Parameters.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusMode)) { + focusIndicator.showStart(); + } else if (mState == STATE_SUCCESS) { + focusIndicator.showSuccess(); + } else if (mState == STATE_FAIL) { + focusIndicator.showFail(); + } } } |
