diff options
author | Patrick Dubroy <dubroy@google.com> | 2011-01-16 17:13:55 -0800 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2011-01-16 17:15:28 -0800 |
commit | 8901ffab294934fc4899143f31bd58f3d58df225 (patch) | |
tree | 50182eda8a069ec383c6ca44a43945d6258ebe4b /core | |
parent | 67e8915c94b4e841c80ce034c212d4f0cf9a5098 (diff) | |
download | frameworks_base-8901ffab294934fc4899143f31bd58f3d58df225.zip frameworks_base-8901ffab294934fc4899143f31bd58f3d58df225.tar.gz frameworks_base-8901ffab294934fc4899143f31bd58f3d58df225.tar.bz2 |
Add a method for clearing all animations on a thread.
Diffstat (limited to 'core')
-rwxr-xr-x | core/java/android/animation/ValueAnimator.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/animation/ValueAnimator.java b/core/java/android/animation/ValueAnimator.java index 1590bf4..5705057 100755 --- a/core/java/android/animation/ValueAnimator.java +++ b/core/java/android/animation/ValueAnimator.java @@ -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(); + } } |