summaryrefslogtreecommitdiffstats
path: root/core/java/android/animation
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2011-01-16 17:13:55 -0800
committerPatrick Dubroy <dubroy@google.com>2011-01-16 17:15:28 -0800
commit8901ffab294934fc4899143f31bd58f3d58df225 (patch)
tree50182eda8a069ec383c6ca44a43945d6258ebe4b /core/java/android/animation
parent67e8915c94b4e841c80ce034c212d4f0cf9a5098 (diff)
downloadframeworks_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/java/android/animation')
-rwxr-xr-xcore/java/android/animation/ValueAnimator.java12
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();
+ }
}