Fixed a quick flash of the icon when adding a notification
The add animation shouldn't run if the icon isn't visible. Test: Add notification while shade open, observe icon closely Fixes: 34502403 Change-Id: I086b7baef5983052af9682e4008fe3d360df6a36
This commit is contained in:
@@ -440,10 +440,12 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
|
||||
AnimationProperties animationProperties = null;
|
||||
if (justAdded) {
|
||||
super.applyToView(icon);
|
||||
icon.setAlpha(0.0f);
|
||||
icon.setVisibleState(StatusBarIconView.STATE_HIDDEN, false /* animate */);
|
||||
animationProperties = ADD_ICON_PROPERTIES;
|
||||
animate = true;
|
||||
if (iconAppearAmount != 0.0f) {
|
||||
icon.setAlpha(0.0f);
|
||||
icon.setVisibleState(StatusBarIconView.STATE_HIDDEN, false /* animate */);
|
||||
animationProperties = ADD_ICON_PROPERTIES;
|
||||
animate = true;
|
||||
}
|
||||
} else if (visibleState != icon.getVisibleState()) {
|
||||
animationProperties = DOT_ANIMATION_PROPERTIES;
|
||||
animate = true;
|
||||
|
||||
Reference in New Issue
Block a user