diff options
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; } |