Merge "Rename remove callback methods."
diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java
index 58c8f97..f4d7af9 100644
--- a/core/java/android/view/Choreographer.java
+++ b/core/java/android/view/Choreographer.java
@@ -196,7 +196,7 @@
}
/**
- * Removes an animation callback.
+ * Removes animation callbacks for the specified runnable.
* Does nothing if the specified animation callback has not been posted or has already
* been removed.
*
@@ -205,12 +205,12 @@
* @see #postAnimationCallback
* @see #postAnimationCallbackDelayed
*/
- public void removeAnimationCallback(Runnable runnable) {
+ public void removeAnimationCallbacks(Runnable runnable) {
if (runnable == null) {
throw new IllegalArgumentException("runnable must not be null");
}
synchronized (mLock) {
- mAnimationCallbacks = removeCallbackLocked(mAnimationCallbacks, runnable);
+ mAnimationCallbacks = removeCallbacksLocked(mAnimationCallbacks, runnable);
}
mHandler.removeMessages(MSG_POST_DELAYED_ANIMATION, runnable);
}
@@ -260,7 +260,7 @@
}
/**
- * Removes a draw callback.
+ * Removes draw callbacks for the specified runnable.
* Does nothing if the specified draw callback has not been posted or has already
* been removed.
*
@@ -269,12 +269,12 @@
* @see #postDrawCallback
* @see #postDrawCallbackDelayed
*/
- public void removeDrawCallback(Runnable runnable) {
+ public void removeDrawCallbacks(Runnable runnable) {
if (runnable == null) {
throw new IllegalArgumentException("runnable must not be null");
}
synchronized (mLock) {
- mDrawCallbacks = removeCallbackLocked(mDrawCallbacks, runnable);
+ mDrawCallbacks = removeCallbacksLocked(mDrawCallbacks, runnable);
}
mHandler.removeMessages(MSG_POST_DELAYED_DRAW, runnable);
}
@@ -427,7 +427,7 @@
return head;
}
- private Callback removeCallbackLocked(Callback head, Runnable runnable) {
+ private Callback removeCallbacksLocked(Callback head, Runnable runnable) {
Callback predecessor = null;
for (Callback callback = head; callback != null;) {
final Callback next = callback.next;
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 9e734a0..80d4c53 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -876,7 +876,7 @@
if (mFrameScheduled) {
mFrameScheduled = false;
- mChoreographer.removeDrawCallback(mFrameRunnable);
+ mChoreographer.removeDrawCallbacks(mFrameRunnable);
}
}
@@ -4027,7 +4027,7 @@
}
if (mPosted && mViews.isEmpty() && mViewRects.isEmpty()) {
- mChoreographer.removeAnimationCallback(this);
+ mChoreographer.removeAnimationCallbacks(this);
mPosted = false;
}
}