Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit edebced7 authored by Selim Cinek's avatar Selim Cinek
Browse files

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
parent 56f542f2
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -440,10 +440,12 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
                AnimationProperties animationProperties = null;
                if (justAdded) {
                    super.applyToView(icon);
                    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;