summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/View.java2
-rw-r--r--core/java/android/view/animation/Animation.java10
2 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 94ff15e..da48f40 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8192,7 +8192,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility
*/
public void clearAnimation() {
if (mCurrentAnimation != null) {
- mCurrentAnimation.cancel();
+ mCurrentAnimation.detach();
}
mCurrentAnimation = null;
}
diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java
index a28c784..4af1c89 100644
--- a/core/java/android/view/animation/Animation.java
+++ b/core/java/android/view/animation/Animation.java
@@ -278,6 +278,16 @@ public abstract class Animation implements Cloneable {
}
/**
+ * @hide
+ */
+ public void detach() {
+ if (mStarted && !mEnded) {
+ if (mListener != null) mListener.onAnimationEnd(this);
+ mEnded = true;
+ }
+ }
+
+ /**
* Whether or not the animation has been initialized.
*
* @return Has this animation been initialized.