diff options
author | Igor Murashkin <iam@google.com> | 2013-10-05 21:18:39 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-05 21:18:39 -0700 |
commit | 15a49e431b3b55a428065fbf0c74d53673508c24 (patch) | |
tree | 40963d7ace56c8e1f4b2528c8df3e8d18653fefe | |
parent | 08dbbb52f0424ae652eb4e8888b056e0adffe615 (diff) | |
parent | a47d6986cb4aa66e277c61df79a3947bbecd5de8 (diff) | |
download | android_frameworks_ex-15a49e431b3b55a428065fbf0c74d53673508c24.tar.gz android_frameworks_ex-15a49e431b3b55a428065fbf0c74d53673508c24.tar.bz2 android_frameworks_ex-15a49e431b3b55a428065fbf0c74d53673508c24.zip |
am a47d6986: gcam: Make AF more tolerant to transitioning into same state
* commit 'a47d6986cb4aa66e277c61df79a3947bbecd5de8':
gcam: Make AF more tolerant to transitioning into same state
-rw-r--r-- | camera2/public/src/com/android/ex/camera2/pos/AutoFocusStateMachine.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/camera2/public/src/com/android/ex/camera2/pos/AutoFocusStateMachine.java b/camera2/public/src/com/android/ex/camera2/pos/AutoFocusStateMachine.java index 11d7403..b2a55e4 100644 --- a/camera2/public/src/com/android/ex/camera2/pos/AutoFocusStateMachine.java +++ b/camera2/public/src/com/android/ex/camera2/pos/AutoFocusStateMachine.java @@ -91,18 +91,21 @@ public class AutoFocusStateMachine { public synchronized void onCaptureCompleted(CaptureResult result) { int afState = result.get(CaptureResult.CONTROL_AF_STATE); + int afMode = result.get(CaptureResult.CONTROL_AF_MODE); - if (DEBUG_LOGGING) Log.d(TAG, "onCaptureCompleted - new AF state = " + afState); + if (DEBUG_LOGGING) Log.d(TAG, "onCaptureCompleted - new AF mode = " + afMode + + " new AF state = " + afState); - if (mLastAfState == afState) { + if (mLastAfState == afState && afMode == mLastAfMode) { // Same AF state as last time, nothing else needs to be done. return; } - if (VERBOSE_LOGGING) Log.v(TAG, "onCaptureCompleted - new AF state = " + afState); + if (VERBOSE_LOGGING) Log.v(TAG, "onCaptureCompleted - new AF mode = " + afMode + + " new AF state = " + afState); mLastAfState = afState; - mLastAfMode = result.get(CaptureResult.CONTROL_AF_MODE); + mLastAfMode = afMode; switch (afState) { case CaptureResult.CONTROL_AF_STATE_FOCUSED_LOCKED: |