Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge "Mms: Add initialization the mLayoutType parameter."

  • Loading branch information...
commit 3d0efa0ca2df27a46ef49c3654873b030ebb5dd0 2 parents 04dc066 + b2511fb
Tom Taylor authored Gerrit Code Review committed
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/com/android/mms/model/LayoutModel.java
View
5 src/com/android/mms/model/LayoutModel.java
@@ -110,6 +110,11 @@ private void validateLayouts() {
if (mTextRegion == null) {
createDefaultTextRegion();
}
+ // LayoutModel will re-construct when orientation changes, so we need to
+ // initialize mLayoutType here. Otherwise, the mLayoutType is alway default
+ // value (LAYOUT_BOTTOM_TEXT) after LayoutModel re-construct.
+ mLayoutType =
+ (mImageRegion.getTop() == 0) ? LAYOUT_BOTTOM_TEXT : LAYOUT_TOP_TEXT;
}
public RegionModel getRootLayout() {
Please sign in to comment.
Something went wrong with that request. Please try again.