diff options
author | kaiyiz <kaiyiz@codeaurora.org> | 2014-07-14 15:51:30 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-07-14 00:58:13 -0700 |
commit | 222b96c4063b1b8276a7c376d266cce207c2ad2e (patch) | |
tree | 2e3c56156b79aa6170bda259fe76075994dff225 /src/com/android | |
parent | 38cc61512bb6615e52bc373986edfadb039c7753 (diff) | |
download | android_packages_apps_Snap-222b96c4063b1b8276a7c376d266cce207c2ad2e.tar.gz android_packages_apps_Snap-222b96c4063b1b8276a7c376d266cce207c2ad2e.tar.bz2 android_packages_apps_Snap-222b96c4063b1b8276a7c376d266cce207c2ad2e.zip |
Camera2: fix face still display after unmark the face detect option
After unmark the face detect option, the value mFace in FaceView maybe
reset value and draw all the time.
The faces should not be draw after stopFaceDetection, so block draw the
faces after stopFaceDetection and unblock after startFaceDetection.
Change-Id: I2f8316e12ad8c7b157bc732800d9247c66a17572
CRs-Fixed: 692057
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 2 | ||||
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index cb76c56e9..31e5c87e7 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -820,7 +820,7 @@ public class PhotoModule mFaceDetectionStarted = false; mCameraDevice.setFaceDetectionCallback(null, null); mCameraDevice.stopFaceDetection(); - mUI.clearFaces(); + mUI.onStopFaceDetection(); } } diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 419cca22b..5a085dca5 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -920,6 +920,7 @@ public class PhotoUI implements PieListener, } public void onStartFaceDetection(int orientation, boolean mirror) { + mFaceView.setBlockDraw(false); mFaceView.clear(); mFaceView.setVisibility(View.VISIBLE); mFaceView.setDisplayOrientation(orientation); @@ -927,6 +928,13 @@ public class PhotoUI implements PieListener, mFaceView.resume(); } + public void onStopFaceDetection() { + if (mFaceView != null) { + mFaceView.setBlockDraw(true); + mFaceView.clear(); + } + } + @Override public void onFaceDetection(Face[] faces, CameraManager.CameraProxy camera) { mFaceView.setFaces(faces); |