summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/Camera.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-08-17 03:09:59 +0800
committerWu-cheng Li <wuchengli@google.com>2011-08-17 03:09:59 +0800
commit1254e04152ce9efc0b54d6d97b5873d7a9acdb2f (patch)
tree41f73a788c58eb1964d3e5e96a47da6cb86e9e94 /src/com/android/camera/Camera.java
parent383a2b45820ff710627dbd536f1bd683e393e335 (diff)
downloadLegacyCamera-1254e04152ce9efc0b54d6d97b5873d7a9acdb2f.zip
LegacyCamera-1254e04152ce9efc0b54d6d97b5873d7a9acdb2f.tar.gz
LegacyCamera-1254e04152ce9efc0b54d6d97b5873d7a9acdb2f.tar.bz2
Revert "Clear the face view in onPause and when face detection starts."
This reverts commit 383a2b45820ff710627dbd536f1bd683e393e335. The changes will have NPE in onPause if the camera cannot be connected.
Diffstat (limited to 'src/com/android/camera/Camera.java')
-rw-r--r--src/com/android/camera/Camera.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index 9d50fde..958a788 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -543,7 +543,6 @@ 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];
@@ -556,7 +555,7 @@ public class Camera extends ActivityBase implements View.OnClickListener,
private void stopFaceDetection() {
if (mParameters.getMaxNumDetectedFaces() > 0) {
mCameraDevice.setFaceDetectionListener(null);
- if (mCameraState != PREVIEW_STOPPED) mCameraDevice.stopFaceDetection();
+ mCameraDevice.stopFaceDetection();
if (mFaceView != null) mFaceView.clearFaces();
}
}
@@ -1460,7 +1459,6 @@ public class Camera extends ActivityBase implements View.OnClickListener,
protected void onPause() {
mPausing = true;
stopPreview();
- stopFaceDetection();
// Close the camera now because other activities may need to use it.
closeCamera();
resetScreenOn();