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

Commit ee20d779 authored by Alan Viverette's avatar Alan Viverette
Browse files

End switch thumb animator if it's been started

Running implies that it's been started and the animation has actually
begun, which is not true if we call start() and then immediately try
to jump state.

Bug: 24273164
Change-Id: I7f8d856dbe925679dad082f1e28d8936ac2b04db
parent 7d92c474
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1387,7 +1387,7 @@ public class Switch extends CompoundButton {
            mTrackDrawable.jumpToCurrentState();
        }

        if (mPositionAnimator != null && mPositionAnimator.isRunning()) {
        if (mPositionAnimator != null && mPositionAnimator.isStarted()) {
            mPositionAnimator.end();
            mPositionAnimator = null;
        }