summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-12-10 14:16:09 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-12-10 14:16:09 -0800
commit203b6826f9958fbafd1a92b4a99d8d9e20e8b248 (patch)
tree45a99ee1ac6280b2d1ea130e25b13f3153756866
parentf10a8fa2a4bd5d26d649842d9063ffe9092bff82 (diff)
parentfdc55e32bb4643ca7a3637045b975d94b25f3714 (diff)
downloadandroid_packages_apps_Snap-203b6826f9958fbafd1a92b4a99d8d9e20e8b248.tar.gz
android_packages_apps_Snap-203b6826f9958fbafd1a92b4a99d8d9e20e8b248.tar.bz2
android_packages_apps_Snap-203b6826f9958fbafd1a92b4a99d8d9e20e8b248.zip
am 695e1aa0: Force a layout pass if the display rotation changes
* commit '695e1aa059cbc2cb2988f6beb0fee8ff7952b229': Force a layout pass if the display rotation changes
-rw-r--r--src/com/android/gallery3d/ui/GLRootView.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/ui/GLRootView.java b/src/com/android/gallery3d/ui/GLRootView.java
index e2268fa4e..6b76999b6 100644
--- a/src/com/android/gallery3d/ui/GLRootView.java
+++ b/src/com/android/gallery3d/ui/GLRootView.java
@@ -394,7 +394,11 @@ public class GLRootView extends GLSurfaceView
mRenderRequested = false;
- if ((mFlags & FLAG_NEED_LAYOUT) != 0) layoutContentPane();
+ if ((mOrientationSource != null
+ && mDisplayRotation != mOrientationSource.getDisplayRotation())
+ || (mFlags & FLAG_NEED_LAYOUT) != 0) {
+ layoutContentPane();
+ }
mCanvas.save(GLCanvas.SAVE_FLAG_ALL);
rotateCanvas(-mCompensation);