summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-03 18:33:47 +0530
committerArne Coucheron <arco68@gmail.com>2018-01-26 01:08:23 +0100
commitf07095322f00ebcffa4f6d9ca4368b743049059d (patch)
tree82aa6bc090ff4dbb67087e775527f5765872f235
parente5f7e1a40f9dac9fd26425fabeddc745e8d47324 (diff)
downloadandroid_packages_apps_Snap-f07095322f00ebcffa4f6d9ca4368b743049059d.zip
android_packages_apps_Snap-f07095322f00ebcffa4f6d9ca4368b743049059d.tar.gz
android_packages_apps_Snap-f07095322f00ebcffa4f6d9ca4368b743049059d.tar.bz2
camera: Keep touch focus intact during back-to-back ZSL shots
* If ZSL is enabled, we should not resetTouchFocus between shots. * Instead, re-kick the timer for each shot. If I set a focus point, I want that point to stick while I take a succession of shots. Change-Id: I407bb1e248cc902355d0294f47b071cc8a32fac3
-rwxr-xr-xsrc/com/android/camera/FocusOverlayManager.java12
-rw-r--r--src/com/android/camera/PhotoModule.java2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/camera/FocusOverlayManager.java b/src/com/android/camera/FocusOverlayManager.java
index 5875c15..b5d34d7 100755
--- a/src/com/android/camera/FocusOverlayManager.java
+++ b/src/com/android/camera/FocusOverlayManager.java
@@ -534,6 +534,15 @@ public class FocusOverlayManager {
return mMeteringArea;
}
+ public void restartTouchFocusTimer() {
+ if (mZslEnabled && (mFocusArea != null) && (mFocusTime != 0x7FFFFFFF)) {
+ mHandler.removeMessages(RESET_TOUCH_FOCUS);
+ mHandler.sendEmptyMessageDelayed(RESET_TOUCH_FOCUS, mFocusTime);
+ } else {
+ resetTouchFocus();
+ }
+ }
+
public void updateFocusUI() {
if (!mInitialized) return;
// Show only focus indicator or face indicator.
@@ -634,7 +643,8 @@ public class FocusOverlayManager {
}
private boolean needAutoFocusCall() {
- return getFocusMode(false).equals(Parameters.FOCUS_MODE_AUTO);
+ return getFocusMode(false).equals(Parameters.FOCUS_MODE_AUTO) &&
+ !(mZslEnabled && (mHandler.hasMessages(RESET_TOUCH_FOCUS)));
}
public void setZslEnable(boolean value) {
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 4a55002..b6bc3e9 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1509,7 +1509,7 @@ public class PhotoModule
}
} else if ((mReceivedSnapNum == mBurstSnapNum)
&& (mCameraState != LONGSHOT)){
- mFocusManager.resetTouchFocus();
+ mFocusManager.restartTouchFocusTimer();
if (CameraUtil.FOCUS_MODE_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode(false))
|| CameraUtil.FOCUS_MODE_MW_CONTINUOUS_PICTURE.equals(mFocusManager.getFocusMode(false))) {
mCameraDevice.cancelAutoFocus();