From e87bf778e33e0bb38e633949a28f051b25fd3ca4 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Thu, 5 Apr 2018 12:48:43 -0700 Subject: [PATCH] Update mFirstVisibleIconState correctly Test: visual Change-Id: I4b6ca09b6bb8241791126f057de6d173ddd7eac0 Fixes: 77634935 --- .../statusbar/phone/NotificationIconContainer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java index 9adf923fa5060..8c257fe255a32 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconContainer.java @@ -370,11 +370,15 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { float layoutEnd = getLayoutEnd(); float overflowStart = getMaxOverflowStart(); mVisualOverflowStart = 0; + mFirstVisibleIconState = null; boolean hasAmbient = mSpeedBumpIndex != -1 && mSpeedBumpIndex < getChildCount(); for (int i = 0; i < childCount; i++) { View view = getChildAt(i); IconState iconState = mIconStates.get(view); iconState.xTranslation = translationX; + if (mFirstVisibleIconState == null) { + mFirstVisibleIconState = iconState; + } boolean forceOverflow = mSpeedBumpIndex != -1 && i >= mSpeedBumpIndex && iconState.iconAppearAmount > 0.0f || i >= maxVisibleIcons; boolean noOverflowAfter = i == childCount - 1; @@ -401,7 +405,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { mNumDots = 0; if (firstOverflowIndex != -1) { translationX = mVisualOverflowStart; - mFirstVisibleIconState = null; for (int i = firstOverflowIndex; i < childCount; i++) { View view = getChildAt(i); IconState iconState = mIconStates.get(view); @@ -416,9 +419,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout { } translationX += (mNumDots == MAX_DOTS ? MAX_DOTS * dotWidth : dotWidth) * iconState.iconAppearAmount; - if (mFirstVisibleIconState == null) { - mFirstVisibleIconState = iconState; - } mLastVisibleIconState = iconState; } else { iconState.visibleState = StatusBarIconView.STATE_HIDDEN;