diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 2806729b835ad..6a7818cf9b75c 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 be98d7ab85002..a1e89b75a9727 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();