Merge "Update mFirstVisibleIconState correctly" into pi-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ec3f8260de
@@ -370,11 +370,15 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
|
|||||||
float layoutEnd = getLayoutEnd();
|
float layoutEnd = getLayoutEnd();
|
||||||
float overflowStart = getMaxOverflowStart();
|
float overflowStart = getMaxOverflowStart();
|
||||||
mVisualOverflowStart = 0;
|
mVisualOverflowStart = 0;
|
||||||
|
mFirstVisibleIconState = null;
|
||||||
boolean hasAmbient = mSpeedBumpIndex != -1 && mSpeedBumpIndex < getChildCount();
|
boolean hasAmbient = mSpeedBumpIndex != -1 && mSpeedBumpIndex < getChildCount();
|
||||||
for (int i = 0; i < childCount; i++) {
|
for (int i = 0; i < childCount; i++) {
|
||||||
View view = getChildAt(i);
|
View view = getChildAt(i);
|
||||||
IconState iconState = mIconStates.get(view);
|
IconState iconState = mIconStates.get(view);
|
||||||
iconState.xTranslation = translationX;
|
iconState.xTranslation = translationX;
|
||||||
|
if (mFirstVisibleIconState == null) {
|
||||||
|
mFirstVisibleIconState = iconState;
|
||||||
|
}
|
||||||
boolean forceOverflow = mSpeedBumpIndex != -1 && i >= mSpeedBumpIndex
|
boolean forceOverflow = mSpeedBumpIndex != -1 && i >= mSpeedBumpIndex
|
||||||
&& iconState.iconAppearAmount > 0.0f || i >= maxVisibleIcons;
|
&& iconState.iconAppearAmount > 0.0f || i >= maxVisibleIcons;
|
||||||
boolean noOverflowAfter = i == childCount - 1;
|
boolean noOverflowAfter = i == childCount - 1;
|
||||||
@@ -401,7 +405,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
|
|||||||
mNumDots = 0;
|
mNumDots = 0;
|
||||||
if (firstOverflowIndex != -1) {
|
if (firstOverflowIndex != -1) {
|
||||||
translationX = mVisualOverflowStart;
|
translationX = mVisualOverflowStart;
|
||||||
mFirstVisibleIconState = null;
|
|
||||||
for (int i = firstOverflowIndex; i < childCount; i++) {
|
for (int i = firstOverflowIndex; i < childCount; i++) {
|
||||||
View view = getChildAt(i);
|
View view = getChildAt(i);
|
||||||
IconState iconState = mIconStates.get(view);
|
IconState iconState = mIconStates.get(view);
|
||||||
@@ -416,9 +419,6 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
|
|||||||
}
|
}
|
||||||
translationX += (mNumDots == MAX_DOTS ? MAX_DOTS * dotWidth : dotWidth)
|
translationX += (mNumDots == MAX_DOTS ? MAX_DOTS * dotWidth : dotWidth)
|
||||||
* iconState.iconAppearAmount;
|
* iconState.iconAppearAmount;
|
||||||
if (mFirstVisibleIconState == null) {
|
|
||||||
mFirstVisibleIconState = iconState;
|
|
||||||
}
|
|
||||||
mLastVisibleIconState = iconState;
|
mLastVisibleIconState = iconState;
|
||||||
} else {
|
} else {
|
||||||
iconState.visibleState = StatusBarIconView.STATE_HIDDEN;
|
iconState.visibleState = StatusBarIconView.STATE_HIDDEN;
|
||||||
|
|||||||
Reference in New Issue
Block a user