diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-08-17 23:26:40 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2011-08-18 00:03:46 +0800 |
commit | cd8d7deb1ca1d8f8cc06100b0760169c7fe488a7 (patch) | |
tree | b53ee944af33e8d6b7f55fb00dea8ac2c6c1b9b1 | |
parent | 74fe6dc0918c8129210cdcf1816a6a052d737997 (diff) | |
download | LegacyCamera-cd8d7deb1ca1d8f8cc06100b0760169c7fe488a7.zip LegacyCamera-cd8d7deb1ca1d8f8cc06100b0760169c7fe488a7.tar.gz LegacyCamera-cd8d7deb1ca1d8f8cc06100b0760169c7fe488a7.tar.bz2 |
Clear the face view in onPause and when face detection starts.
bug:5169594
Change-Id: I822e8860861c6b11ab55bcfd5a9604e4fcee8d6a
-rw-r--r-- | src/com/android/camera/Camera.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index 52997f7..46fffd4 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -550,6 +550,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, private void startFaceDetection() { if (mParameters.getMaxNumDetectedFaces() > 0) { mFaceView = (FaceView) findViewById(R.id.face_view); + mFaceView.clearFaces(); mFaceView.setVisibility(View.VISIBLE); mFaceView.setDisplayOrientation(mDisplayOrientation); CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId]; @@ -1461,7 +1462,11 @@ public class Camera extends ActivityBase implements View.OnClickListener, // Close the camera now because other activities may need to use it. closeCamera(); resetScreenOn(); + + // Clear UI. collapseCameraControls(); + if (mSharePopup != null) mSharePopup.dismiss(); + if (mFaceView != null) mFaceView.clearFaces(); if (mFirstTimeInitialized) { mOrientationListener.disable(); @@ -1473,8 +1478,6 @@ public class Camera extends ActivityBase implements View.OnClickListener, hidePostCaptureAlert(); } - if (mSharePopup != null) mSharePopup.dismiss(); - if (mDidRegister) { unregisterReceiver(mReceiver); mDidRegister = false; @@ -1843,6 +1846,7 @@ public class Camera extends ActivityBase implements View.OnClickListener, if (mCameraDevice != null) { CameraHolder.instance().release(); mCameraDevice.setZoomChangeListener(null); + mCameraDevice.setFaceDetectionListener(null); mCameraDevice = null; mCameraState = PREVIEW_STOPPED; } |