Fixed a bug where the notification icons wouldn't match

If there was just one ambient notification available, we
Would suck in one icon too much when expanded.

Test: add 1 high and 1 min priority notification, observe icons
Change-Id: I043011c6d99c49b9764017565ee48349fce920eb
This commit is contained in:
Selim Cinek
2017-02-03 11:22:25 -08:00
parent f20254c6f9
commit 56f542f249

View File

@@ -255,7 +255,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
iconState.visibleState = StatusBarIconView.STATE_ICON;
if (firstOverflowIndex == -1 && (isAmbient
|| (translationX >= (noOverflowAfter ? layoutEnd - mIconSize : overflowStart)))) {
firstOverflowIndex = noOverflowAfter ? i - 1 : i;
firstOverflowIndex = noOverflowAfter && !isAmbient ? i - 1 : i;
int totalDotLength = mStaticDotRadius * 6 + 2 * mDotPadding;
visualOverflowStart = overflowStart + mIconSize * (1 + OVERFLOW_EARLY_AMOUNT)
- totalDotLength / 2