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

Commit f39fa376 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Only start AnimationDrawable on visibility change when animating"

parents 3fe7830f 97fb0aa5
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);