am 695e1aa0: Force a layout pass if the display rotation changes

* commit '695e1aa059cbc2cb2988f6beb0fee8ff7952b229':
  Force a layout pass if the display rotation changes
diff --git a/src/com/android/gallery3d/ui/GLRootView.java b/src/com/android/gallery3d/ui/GLRootView.java
index e2268fa..6b76999 100644
--- a/src/com/android/gallery3d/ui/GLRootView.java
+++ b/src/com/android/gallery3d/ui/GLRootView.java
@@ -394,7 +394,11 @@
 
         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);