diff options
author | Wu-cheng Li <wuchengli@google.com> | 2011-08-17 23:03:38 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-17 23:03:38 -0700 |
commit | c852ce9bee37362da5e9f33548daae9bcee8db70 (patch) | |
tree | 281c63254e41e38b9eb6e28c90b9c66ee4a49d1a /src/com/android/camera/Camera.java | |
parent | 98c85e2f5bfcaf4ab5257065a238fceb46ce754f (diff) | |
parent | cd8d7deb1ca1d8f8cc06100b0760169c7fe488a7 (diff) | |
download | LegacyCamera-c852ce9bee37362da5e9f33548daae9bcee8db70.zip LegacyCamera-c852ce9bee37362da5e9f33548daae9bcee8db70.tar.gz LegacyCamera-c852ce9bee37362da5e9f33548daae9bcee8db70.tar.bz2 |
Merge "Clear the face view in onPause and when face detection starts."
Diffstat (limited to 'src/com/android/camera/Camera.java')
-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 50b5165..109fd2a 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -546,6 +546,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]; @@ -1441,7 +1442,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(); @@ -1453,8 +1458,6 @@ public class Camera extends ActivityBase implements View.OnClickListener, hidePostCaptureAlert(); } - if (mSharePopup != null) mSharePopup.dismiss(); - if (mDidRegister) { unregisterReceiver(mReceiver); mDidRegister = false; @@ -1823,6 +1826,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; } |