diff options
author | Selim Cinek <cinek@google.com> | 2015-05-05 23:54:57 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-05 23:55:00 +0000 |
commit | 6da881ba7d6b2b860770aabcb0daefcde85ece20 (patch) | |
tree | c15ae1c6bda7425c81f835470c05185f3b201607 /packages | |
parent | 1e139e86843b59839f9eb6f88466d152b7e23c03 (diff) | |
parent | 81e36fe7c21484d8030d9600a330b64e6dd2dbd0 (diff) | |
download | frameworks_base-6da881ba7d6b2b860770aabcb0daefcde85ece20.zip frameworks_base-6da881ba7d6b2b860770aabcb0daefcde85ece20.tar.gz frameworks_base-6da881ba7d6b2b860770aabcb0daefcde85ece20.tar.bz2 |
Merge "Fixed a measuring bug when the panel was collapsed" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java index e632cc8..17e2cb5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java @@ -59,13 +59,6 @@ public abstract class ExpandableView extends FrameLayout { @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int ownMaxHeight = mMaxViewHeight; - int heightMode = MeasureSpec.getMode(heightMeasureSpec); - boolean hasFixedHeight = heightMode == MeasureSpec.EXACTLY; - boolean isHeightLimited = heightMode == MeasureSpec.AT_MOST; - if (hasFixedHeight || isHeightLimited) { - int size = MeasureSpec.getSize(heightMeasureSpec); - ownMaxHeight = Math.min(ownMaxHeight, size); - } int newHeightSpec = MeasureSpec.makeMeasureSpec(ownMaxHeight, MeasureSpec.AT_MOST); int maxChildHeight = 0; int childCount = getChildCount(); @@ -92,8 +85,7 @@ public abstract class ExpandableView extends FrameLayout { mMatchParentViews.add(child); } } - int ownHeight = hasFixedHeight ? ownMaxHeight : - isHeightLimited ? Math.min(ownMaxHeight, maxChildHeight) : maxChildHeight; + int ownHeight = Math.min(ownMaxHeight, maxChildHeight); newHeightSpec = MeasureSpec.makeMeasureSpec(ownHeight, MeasureSpec.EXACTLY); for (View child : mMatchParentViews) { child.measure(getChildMeasureSpec( |