summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Yoo <jyoo@codeaurora.org>2015-10-22 12:33:06 -0700
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2016-01-08 22:48:44 -0800
commitba56fa8fe75c30881d4920738f085f9ca92adae1 (patch)
tree3d886f73067cc9596529bcaebd84e8e43e08b92c
parent04f6b228b29b1ea1b891df5e0a21a43527d1ef53 (diff)
downloadandroid_packages_apps_Snap-ba56fa8fe75c30881d4920738f085f9ca92adae1.tar.gz
android_packages_apps_Snap-ba56fa8fe75c30881d4920738f085f9ca92adae1.tar.bz2
android_packages_apps_Snap-ba56fa8fe75c30881d4920738f085f9ca92adae1.zip
PhotoUI: Calling layoutPreview on holdersize become valid
Need to ensure calling layoutPreview on max size change Change-Id: I8c49397c85c592879c38585ff66d1d24bde72d86 CRs-Fixed: 927240
-rw-r--r--src/com/android/camera/PhotoUI.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 78bd45507..7b14c81a6 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -235,10 +235,12 @@ public class PhotoUI implements PieListener,
int oldBottom) {
int width = right - left;
int height = bottom - top;
+ boolean isMaxSizeBeingValid = false;
if (mMaxPreviewWidth == 0 && mMaxPreviewHeight == 0) {
mMaxPreviewWidth = width;
mMaxPreviewHeight = height;
+ isMaxSizeBeingValid = true;
}
int orientation = mActivity.getResources().getConfiguration().orientation;
@@ -257,7 +259,7 @@ public class PhotoUI implements PieListener,
}
}
if (mOrientationResize != mPrevOrientationResize
- || mAspectRatioResize) {
+ || mAspectRatioResize || isMaxSizeBeingValid) {
layoutPreview(mAspectRatio);
mAspectRatioResize = false;
}