diff options
author | Jack Yoo <jyoo@codeaurora.org> | 2016-04-18 14:38:27 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2016-08-03 15:45:46 -0700 |
commit | e5d300a3dc13848fe8a8920bafb5474c29b44213 (patch) | |
tree | 77b2ff882c172e4a369292f5ca7afc35188191ed /src/com/android/camera | |
parent | 96c7df0073613b5945322b3be575a597c3f38a35 (diff) | |
download | android_packages_apps_Snap-e5d300a3dc13848fe8a8920bafb5474c29b44213.tar.gz android_packages_apps_Snap-e5d300a3dc13848fe8a8920bafb5474c29b44213.tar.bz2 android_packages_apps_Snap-e5d300a3dc13848fe8a8920bafb5474c29b44213.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')
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index dd2055527..a2d86313b 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -251,21 +251,6 @@ public class PhotoUI implements PieListener, isMaxSizeBeingValid = true; } - 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 || isMaxSizeBeingValid) { layoutPreview(mAspectRatio); |