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

Commit 5a175d9d authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug where the notification icon would stop animating

For notification children, the notification header or when updated
the notification icon would sometimes stop animating.
This is now fixed.

Change-Id: Id8ed4e1c548cd1cf4d5ea18b8e4084a376998c14
parent 8fc93c90
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    private FalsingManager mFalsingManager;

    private boolean mJustClicked;
    private boolean mIconAnimationRunning;
    private boolean mShowNoBackground;
    private ExpandableNotificationRow mNotificationParent;
    private OnClickListener mExpandClickListener = new OnClickListener() {
@@ -126,6 +127,16 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
    public void setIconAnimationRunning(boolean running) {
        setIconAnimationRunning(running, mPublicLayout);
        setIconAnimationRunning(running, mPrivateLayout);
        setIconAnimationRunningForChild(running, mNotificationHeader);
        if (mIsSummaryWithChildren) {
            List<ExpandableNotificationRow> notificationChildren =
                    mChildrenContainer.getNotificationChildren();
            for (int i = 0; i < notificationChildren.size(); i++) {
                ExpandableNotificationRow child = notificationChildren.get(i);
                child.setIconAnimationRunning(running);
            }
        }
        mIconAnimationRunning = running;
    }

    private void setIconAnimationRunning(boolean running, NotificationContentView layout) {
@@ -178,6 +189,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
        if (mIsSummaryWithChildren) {
            recreateNotificationHeader();
        }
        if (mIconAnimationRunning) {
            setIconAnimationRunning(true);
        }
        onChildrenCountChanged();
    }