diff options
Diffstat (limited to 'src/com')
-rwxr-xr-x | src/com/android/camera/CaptureUI.java | 6 | ||||
-rw-r--r-- | src/com/android/camera/ui/Camera2FaceView.java | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java index 450ba62b3..950820fcc 100755 --- a/src/com/android/camera/CaptureUI.java +++ b/src/com/android/camera/CaptureUI.java @@ -177,6 +177,7 @@ public class CaptureUI implements FocusOverlayManager.FocusUI, private Allocation mMonoDummyAllocation; private Allocation mMonoDummyOutputAllocation; private boolean mIsMonoDummyAllocationEverUsed = false; + private boolean mIsTouchAF = false; private int mScreenRatio = CameraUtil.RATIO_UNKNOWN; private int mTopMargin = 0; @@ -1430,7 +1431,8 @@ public class CaptureUI implements FocusOverlayManager.FocusUI, return mTrackingFocusRenderer; } - return (mFaceView != null && mFaceView.faceExists()) ? mFaceView : mPieRenderer; + return (mFaceView != null && mFaceView.faceExists() && !mIsTouchAF) ? + mFaceView : mPieRenderer; } @Override @@ -1446,11 +1448,13 @@ public class CaptureUI implements FocusOverlayManager.FocusUI, public void clearFocus() { FocusIndicator indicator = getFocusIndicator(); if (indicator != null) indicator.clear(); + mIsTouchAF = false; } @Override public void setFocusPosition(int x, int y) { mPieRenderer.setFocus(x, y); + mIsTouchAF = true; } @Override diff --git a/src/com/android/camera/ui/Camera2FaceView.java b/src/com/android/camera/ui/Camera2FaceView.java index 81be61f81..28a67be4d 100644 --- a/src/com/android/camera/ui/Camera2FaceView.java +++ b/src/com/android/camera/ui/Camera2FaceView.java @@ -106,6 +106,11 @@ public class Camera2FaceView extends FaceView { } @Override + public boolean faceExists() { + return (mFaces != null && mFaces.length > 0); + } + + @Override protected void onDraw(Canvas canvas) { if (!mBlocked && (mFaces != null) && (mFaces.length > 0) && mCameraBound != null) { int rw, rh; |