Permalink
Browse files

Mms: Add initialization the mLayoutType parameter.

The mLayoutType value is always assigned to default value after
LayoutModel class re-construct.

Change-Id: Ib6085f21bff0de9ff735a0205b17431185bc4838
Author: Bin Yang <bin.y.yang@intel.com>
Signed-off-by: b416 <haixiong.zheng@borqs.com>
Signed-off-by: Bin Yang <bin.y.yang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 7957
  • Loading branch information...
Bin Yang authored and shuogao committed Sep 16, 2011
1 parent 04dc066 commit b2511fb26349890e8901f37cf8800bdf0af952c3
Showing with 5 additions and 0 deletions.
  1. +5 −0 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() {

0 comments on commit b2511fb

Please sign in to comment.