summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2015-05-04 20:46:25 -0700
committerSelim Cinek <cinek@google.com>2015-05-05 14:53:09 -0700
commit81e36fe7c21484d8030d9600a330b64e6dd2dbd0 (patch)
tree3f72b7e5a21b9e1dd386ccb6dd8c6e2f8823d8f2 /packages
parent173f2d0fad8dc889beefff67be96ec865465d1e0 (diff)
downloadframeworks_base-81e36fe7c21484d8030d9600a330b64e6dd2dbd0.zip
frameworks_base-81e36fe7c21484d8030d9600a330b64e6dd2dbd0.tar.gz
frameworks_base-81e36fe7c21484d8030d9600a330b64e6dd2dbd0.tar.bz2
Fixed a measuring bug when the panel was collapsed
This lead to the dismissView and other views being measured with height 0 and therefore harm performance and animations. Bug: 20665047 Change-Id: I985c40948994b409cea5ac7c34a711ce243c62f1
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java10
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(