summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoris Liu <tianliu@google.com>2013-02-13 18:28:03 -0800
committerDoris Liu <tianliu@google.com>2013-02-13 18:34:10 -0800
commit3c2fca3fe03888a3db308eea5e69b38479433706 (patch)
tree3eac90e1f3ffcae98d5a8b60a05138cf5b844043 /src
parent9147ab1b489170a3f6454e2b3f425d60505ea208 (diff)
downloadandroid_packages_apps_Snap-3c2fca3fe03888a3db308eea5e69b38479433706.tar.gz
android_packages_apps_Snap-3c2fca3fe03888a3db308eea5e69b38479433706.tar.bz2
android_packages_apps_Snap-3c2fca3fe03888a3db308eea5e69b38479433706.zip
Fix video disappearing when rotated
Bug: 7459723 Change-Id: I0f42e476cfda6c0c757ca1fda3dd8072bec25a37
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index c43ff9385..b7bd20831 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -651,7 +651,7 @@ public class VideoModule implements CameraModule,
if (mQuickCapture) {
doReturnToCaller(!recordFail);
} else if (!recordFail) {
- showAlert();
+ showCaptureResult();
}
}
} else if (!recordFail){
@@ -1657,14 +1657,14 @@ public class VideoModule implements CameraModule,
}
}
- private void showAlert() {
+ private void showCaptureResult() {
Bitmap bitmap = null;
if (mVideoFileDescriptor != null) {
bitmap = Thumbnail.createVideoThumbnailBitmap(mVideoFileDescriptor.getFileDescriptor(),
- mPreviewFrameLayout.getWidth());
+ mDesiredPreviewWidth);
} else if (mCurrentVideoFilename != null) {
bitmap = Thumbnail.createVideoThumbnailBitmap(mCurrentVideoFilename,
- mPreviewFrameLayout.getWidth());
+ mDesiredPreviewWidth);
}
if (bitmap != null) {
// MetadataRetriever already rotates the thumbnail. We should rotate
@@ -2052,7 +2052,7 @@ public class VideoModule implements CameraModule,
if (mQuickCapture) {
doReturnToCaller(true);
} else {
- showAlert();
+ showCaptureResult();
}
}
}
@@ -2203,7 +2203,6 @@ public class VideoModule implements CameraModule,
@Override
public void onConfigurationChanged(Configuration newConfig) {
setDisplayOrientation();
-
// Change layout in response to configuration change
LayoutInflater inflater = mActivity.getLayoutInflater();
((ViewGroup) mRootView).removeAllViews();
@@ -2223,6 +2222,9 @@ public class VideoModule implements CameraModule,
initializeZoom();
onFullScreenChanged(mActivity.isInCameraApp());
updateOnScreenIndicators();
+ if (mIsVideoCaptureIntent && mVideoFileDescriptor != null) {
+ showCaptureResult();
+ }
}
@Override