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

Commit 1996dbb1 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Make AnimatedImageDrawable.start reset

Bug: b/63908092
Test: Manual: Ie18811ba29a1db163aca08472b04ae185e9344f0

If the animation has already started and stopped (via stop()), restart
the animatino on a call to start().

Change-Id: I0a14a1e643f32469fe5519949ee8ef046107e9a8
parent 5b7f426f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -319,7 +319,8 @@ public class AnimatedImageDrawable extends Drawable implements Animatable2 {
    /**
     *  Start the animation.
     *
     *  <p>Does nothing if the animation is already running.
     *  <p>Does nothing if the animation is already running. If the animation is stopped,
     *  this will reset it.</p>
     *
     *  <p>If the animation starts, this will call
     *  {@link Animatable2.AnimationCallback#onAnimationStart}.</p>
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ bool AnimatedImageDrawable::start() {
        return false;
    }

    // This will trigger a reset.
    mFinished = true;

    mRunning = true;
    return true;
}