summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-03 18:33:47 +0530
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-20 13:48:36 -0800
commit2a9565943325791a3a10462e70e9f027b7bec50c (patch)
tree897545f89b9e993711233d3a11e0489914e70339
parent28c3ed1b3e7770358359fba023848caa4200884b (diff)
downloadandroid_packages_apps_Snap-2a9565943325791a3a10462e70e9f027b7bec50c.zip
android_packages_apps_Snap-2a9565943325791a3a10462e70e9f027b7bec50c.tar.gz
android_packages_apps_Snap-2a9565943325791a3a10462e70e9f027b7bec50c.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
-rw-r--r--src/com/android/camera/FocusOverlayManager.java12
-rw-r--r--src/com/android/camera/PhotoModule.java4
2 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/camera/FocusOverlayManager.java b/src/com/android/camera/FocusOverlayManager.java
index d248a01..4b2d87c 100644
--- a/src/com/android/camera/FocusOverlayManager.java
+++ b/src/com/android/camera/FocusOverlayManager.java
@@ -502,6 +502,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 resetTouchFocus() {
if (!mInitialized) return;
@@ -568,7 +577,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 36fde8b..4890d74 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1255,9 +1255,9 @@ public class PhotoModule
mCameraDevice.cancelAutoFocus();
}
} else if (((mCameraState != LONGSHOT) && (mReceivedSnapNum == mBurstSnapNum))
- || isLongshotDone()){
+ || isLongshotDone()) {
mUI.enableShutter(true);
- 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();