summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/VideoCamera.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 1d19561..cb0bb02 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -639,6 +639,10 @@ public class VideoCamera extends NoSearchActivity
}
mCameraDevice.lock();
+ if (mPreviewing == true) {
+ mCameraDevice.stopPreview();
+ mPreviewing = false;
+ }
setPreviewDisplay(mSurfaceHolder);
Util.setCameraDisplayOrientation(this, mCameraId, mCameraDevice);
setCameraParameters();
@@ -805,6 +809,10 @@ public class VideoCamera extends NoSearchActivity
mHandler.sendEmptyMessage(INIT_RECORDER);
} else {
stopVideoRecording();
+ // If video quality changes, the surface will change. But we need to
+ // initialize the recorder here. So collpase the head-up display to
+ // keep the state of recorder consistent.
+ mHeadUpDisplay.collapse();
restartPreview();
initializeRecorder();
}