Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
Mms: Add initialization the mLayoutType parameter.
Browse files Browse the repository at this point in the history
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 Dec 19, 2012
1 parent 04dc066 commit b2511fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/com/android/mms/model/LayoutModel.java
Expand Up @@ -110,6 +110,11 @@ private void validateLayouts() {
if (mTextRegion == null) { if (mTextRegion == null) {
createDefaultTextRegion(); 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() { public RegionModel getRootLayout() {
Expand Down

0 comments on commit b2511fb

Please sign in to comment.