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

Commit 97fb0aa5 authored by Alan Viverette's avatar Alan Viverette
Browse files

Only start AnimationDrawable on visibility change when animating

BUG: 15532494
Change-Id: I5663fc86e64c34db84385238865e08297fb1f817
parent 4ffd507e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -537,4 +537,3 @@ public class AnimatedStateListDrawable extends StateListDrawable {
        }
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -91,10 +91,10 @@ public class AnimationDrawable extends DrawableContainer implements Runnable, An

    @Override
    public boolean setVisible(boolean visible, boolean restart) {
        boolean changed = super.setVisible(visible, restart);
        final boolean changed = super.setVisible(visible, restart);
        if (visible) {
            if (changed || restart) {
                setFrame(0, true, restart || mCurFrame >= 0);
                setFrame(0, true, mAnimating);
            }
        } else {
            unscheduleSelf(this);