summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-03-09 15:37:04 -0800
committerWu-cheng Li <wuchengli@google.com>2010-03-09 15:37:04 -0800
commitf08b1fdd1e860be0f27b277e0bbb9c2457d1abe0 (patch)
treedca0cfcb9ab966587f93187214f3d07133d88f3a /src/com/android/camera/VideoCamera.java
parentf36c08d33e8ef9c9e84e314595137c91fa228ee9 (diff)
downloadLegacyCamera-f08b1fdd1e860be0f27b277e0bbb9c2457d1abe0.zip
LegacyCamera-f08b1fdd1e860be0f27b277e0bbb9c2457d1abe0.tar.gz
LegacyCamera-f08b1fdd1e860be0f27b277e0bbb9c2457d1abe0.tar.bz2
Hide the preview in onPause to avoid rotated preview.
bug:2257616 Change-Id: Ifce981831ce7022546ad1ec11527f2fe0bf36ff5
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r--src/com/android/camera/VideoCamera.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index fc8164e..fb4f478 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -543,6 +543,7 @@ public class VideoCamera extends NoSearchActivity
super.onResume();
mPausing = false;
+ mVideoPreview.setVisibility(View.VISIBLE);
readVideoPreferences();
resizeForPreviewAspectRatio();
if (!mPreviewing && !mStartPreviewFail) {
@@ -639,6 +640,10 @@ public class VideoCamera extends NoSearchActivity
mPausing = true;
+ // Hide the preview now. Otherwise, the preview may be rotated during
+ // onPause and it is annoying to users.
+ mVideoPreview.setVisibility(View.INVISIBLE);
+
if (mSettings != null && mSettings.isVisible()) {
mSettings.setVisible(false);
}