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

Commit 8901ffab authored by Patrick Dubroy's avatar Patrick Dubroy
Browse files

Add a method for clearing all animations on a thread.

parent 67e8915c
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1192,4 +1192,16 @@ public class ValueAnimator extends Animator {
    public static int getCurrentAnimationsCount() {
        return sAnimations.get().size();
    }

    /**
     * Clear all animations on this thread, without canceling or ending them.
     * This should be used with caution.
     *
     * @hide
     */
    public static void clearAllAnimations() {
        sAnimations.get().clear();
        sPendingAnimations.get().clear();
        sDelayedAnims.get().clear();
    }
}