Merge "Fixed a crash where the overflow number wasn\'t initialized" into nyc-dev

am: 8f4f2a9

* commit '8f4f2a9bfcc9520f95f58cdedc570c5df8a1c7de':
  Fixed a crash where the overflow number wasn't initialized

Change-Id: Iedb24f86def1a114942f54f448ac4c98727c2709
This commit is contained in:
Selim Cinek
2016-04-27 23:05:27 +00:00
committed by android-build-merger
2 changed files with 7 additions and 1 deletions

View File

@@ -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 */);
}

View File

@@ -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();