diff options
| author | Doris Liu <tianliu@google.com> | 2013-02-13 18:28:03 -0800 |
|---|---|---|
| committer | Doris Liu <tianliu@google.com> | 2013-02-13 18:34:10 -0800 |
| commit | e0d4962f96a01b0ff403f8149b9e92ae81f58b77 (patch) | |
| tree | ffccb3c4519e0bc2c47e8697a47777b4346619fc /src | |
| parent | a9ec959c6e43c00db0e74856f76efba976300f80 (diff) | |
| download | android_packages_apps_Gallery2-e0d4962f96a01b0ff403f8149b9e92ae81f58b77.tar.gz android_packages_apps_Gallery2-e0d4962f96a01b0ff403f8149b9e92ae81f58b77.tar.bz2 android_packages_apps_Gallery2-e0d4962f96a01b0ff403f8149b9e92ae81f58b77.zip | |
Fix video disappearing when rotated
Bug: 7459723
Change-Id: I0f42e476cfda6c0c757ca1fda3dd8072bec25a37
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/camera/VideoModule.java | 14 |
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 |
