From b41b2f6fc2bcce6da6d6ae855a2a36cfa6f7f99d Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 26 Apr 2016 14:03:29 -0700 Subject: Fixed a crash where the overflow number wasn't initialized Change-Id: I2df85055d5670af3a6c78a2b62bc62c9297ead78 Fixes: 28008437 --- .../src/com/android/systemui/statusbar/ExpandableNotificationRow.java | 4 ++++ .../systemui/statusbar/stack/NotificationChildrenContainer.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 2806729b835a..6a7818cf9b75 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -277,6 +277,10 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { int intrinsicBefore = getIntrinsicHeight(); mIsHeadsUp = isHeadsUp; mPrivateLayout.setHeadsUp(isHeadsUp); + if (mIsSummaryWithChildren) { + // The overflow might change since we allow more lines as HUN. + mChildrenContainer.updateGroupOverflow(); + } if (intrinsicBefore != getIntrinsicHeight()) { notifyHeightChanged(false /* needsAnimation */); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java index be98d7ab8500..a1e89b75a972 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java @@ -139,7 +139,9 @@ public class NotificationChildrenContainer extends ViewGroup { for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mChildren.get(i); boolean isOverflow = i == overflowIndex; - child.setSingleLineWidthIndention(isOverflow ? mOverflowNumber.getMeasuredWidth() : 0); + child.setSingleLineWidthIndention(isOverflow && mOverflowNumber != null + ? mOverflowNumber.getMeasuredWidth() + : 0); child.measure(widthMeasureSpec, newHeightSpec); height += child.getMeasuredHeight(); -- cgit v1.2.3-59-g8ed1b