summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2016-04-26 14:03:29 -0700
committer Selim Cinek <cinek@google.com> 2016-04-27 13:44:15 -0700
commitb41b2f6fc2bcce6da6d6ae855a2a36cfa6f7f99d (patch)
tree86cda7c0860670e5649f9ab72b3ca6dc17b27a54
parent7599878c8a777eb52a14a43a6d63b799fe3bc53b (diff)
Fixed a crash where the overflow number wasn't initialized
Change-Id: I2df85055d5670af3a6c78a2b62bc62c9297ead78 Fixes: 28008437
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java4
2 files changed, 7 insertions, 1 deletions
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();