diff options
author | Sultanxda <sultanxda@gmail.com> | 2015-12-06 10:30:28 -0800 |
---|---|---|
committer | Arne Coucheron <arco68@gmail.com> | 2018-01-26 01:08:14 +0100 |
commit | 70355b76b9f8fb8223c99cf497a51e900df975ea (patch) | |
tree | 4f45baed1a0e2114af6632ab6e3dfce1a08b4b89 /src/com/android | |
parent | c5868ca8f4f885bc616e0050e4b744b0640f664d (diff) | |
download | android_packages_apps_Snap-70355b76b9f8fb8223c99cf497a51e900df975ea.tar.gz android_packages_apps_Snap-70355b76b9f8fb8223c99cf497a51e900df975ea.tar.bz2 android_packages_apps_Snap-70355b76b9f8fb8223c99cf497a51e900df975ea.zip |
Snap: Add ability to set the tap-to-focus duration to 0 sec
Setting a tap-to-focus duration of 0 seconds allows for a quick, manual
refocus of the subject without interfering with the exposure. This is
particularly useful when recording videos.
[mikeioannina]: Adapted to Snap
Change-Id: Ie3d92e50f755c938e9725438ba5baad0d0985485
Signed-off-by: Sultanxda <sultanxda@gmail.com>
Diffstat (limited to 'src/com/android')
-rwxr-xr-x | src/com/android/camera/FocusOverlayManager.java | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/com/android/camera/FocusOverlayManager.java b/src/com/android/camera/FocusOverlayManager.java index 53fdbb4f7..ed662107a 100755 --- a/src/com/android/camera/FocusOverlayManager.java +++ b/src/com/android/camera/FocusOverlayManager.java @@ -292,8 +292,10 @@ public class FocusOverlayManager { if (focused) { mState = STATE_SUCCESS; // Lock exposure and white balance - setAeAwbLock(true); - mListener.setFocusParameters(); + if (mFocusTime != 200) { + setAeAwbLock(true); + mListener.setFocusParameters(); + } } else { mState = STATE_FAIL; } @@ -306,15 +308,17 @@ public class FocusOverlayManager { if (focused) { mState = STATE_SUCCESS; // Lock exposure and white balance - setAeAwbLock(true); - mListener.setFocusParameters(); + if (mFocusTime != 200) { + setAeAwbLock(true); + mListener.setFocusParameters(); + } } else { mState = STATE_FAIL; } updateFocusUI(); // If this is triggered by touch focus, cancel focus after a // while. - if ((mFocusArea != null) && (mFocusTime != 0)) { + if (mFocusArea != null) { mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime); } if (shutterButtonPressed) { @@ -418,6 +422,11 @@ public class FocusOverlayManager { // Stop face detection because we want to specify focus and metering area. mListener.stopFaceDetection(); + if (mFocusTime == 200) { + setAeAwbLock(true); + mListener.setFocusParameters(); + } + // Set the focus area and metering area. mListener.setFocusParameters(); if (mFocusAreaSupported) { @@ -425,9 +434,7 @@ public class FocusOverlayManager { } else { // Just show the indicator in all other cases. updateFocusUI(); mHandler.removeMessages(RESET_TOUCH_FOCUS); - if (mFocusTime != 0) { - mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime); - } + mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime); } } |