summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/PhotoUI.java
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2016-04-18 14:38:27 -0700
committerJack Yoo <jyoo@codeaurora.org>2016-04-18 14:38:27 -0700
commit342f48c556dbf0ca67aee89f6d34c1a29152b654 (patch)
treeae544df050f85f29ac8c3eb4892bcf94b65a7c01 /src/com/android/camera/PhotoUI.java
parentc677af58364c893bbee13b7f33451d8af6e2256c (diff)
downloadandroid_packages_apps_Snap-342f48c556dbf0ca67aee89f6d34c1a29152b654.tar.gz
android_packages_apps_Snap-342f48c556dbf0ca67aee89f6d34c1a29152b654.tar.bz2
android_packages_apps_Snap-342f48c556dbf0ca67aee89f6d34c1a29152b654.zip
SnapdragonCamera: Removing unnecessary orientation check
Removing unnecessary code of checking the orientation. Swapping width and height causes redundant shrinking resulting to the wrong size calculation. Change-Id: I64badc2bd3198e409fe5673198e864d5025364e9 CRs-Fixed: 979254
Diffstat (limited to 'src/com/android/camera/PhotoUI.java')
-rw-r--r--src/com/android/camera/PhotoUI.java15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index d4503af77..c8e01fea0 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -259,21 +259,6 @@ public class PhotoUI implements PieListener,
mMaxPreviewHeight = height;
}
- int orientation = mActivity.getResources().getConfiguration().orientation;
- if ((orientation == Configuration.ORIENTATION_PORTRAIT && width > height)
- || (orientation == Configuration.ORIENTATION_LANDSCAPE && width < height)) {
- // The screen has rotated; swap SurfaceView width & height
- // to ensure correct preview
- int oldWidth = width;
- width = height;
- height = oldWidth;
- Log.d(TAG, "Swapping SurfaceView width & height dimensions");
- if (mMaxPreviewWidth != 0 && mMaxPreviewHeight != 0) {
- int temp = mMaxPreviewWidth;
- mMaxPreviewWidth = mMaxPreviewHeight;
- mMaxPreviewHeight = temp;
- }
- }
if (mOrientationResize != mPrevOrientationResize
|| mAspectRatioResize) {
layoutPreview(mAspectRatio);