From 4f8a98cb26a26e4b614206981fb0a3b3d0e3d273 Mon Sep 17 00:00:00 2001 From: Doris Liu Date: Tue, 16 Jan 2018 18:13:57 -0800 Subject: [PATCH] Expose some hidden APIs in Choreographer to CTS BUG: 62066083 Test: make CtsViewTestCases Change-Id: I577211e476119ea78ba63aff69987794e8b31a69 --- api/test-current.txt | 3 +++ core/java/android/view/Choreographer.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/api/test-current.txt b/api/test-current.txt index 6941731c29cd8..63302ba0edeeb 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -966,6 +966,9 @@ package android.view { public final class Choreographer { method public static long getFrameDelay(); + method public void postCallback(int, java.lang.Runnable, java.lang.Object); + method public void postCallbackDelayed(int, java.lang.Runnable, java.lang.Object, long); + method public void removeCallbacks(int, java.lang.Runnable, java.lang.Object); method public static void setFrameDelay(long); field public static final int CALLBACK_ANIMATION = 1; // 0x1 } diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index 33fbf73b4371b..1caea57731609 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -373,6 +373,7 @@ public final class Choreographer { * @see #removeCallbacks * @hide */ + @TestApi public void postCallback(int callbackType, Runnable action, Object token) { postCallbackDelayed(callbackType, action, token, 0); } @@ -391,6 +392,7 @@ public final class Choreographer { * @see #removeCallback * @hide */ + @TestApi public void postCallbackDelayed(int callbackType, Runnable action, Object token, long delayMillis) { if (action == null) { @@ -440,6 +442,7 @@ public final class Choreographer { * @see #postCallbackDelayed * @hide */ + @TestApi public void removeCallbacks(int callbackType, Runnable action, Object token) { if (callbackType < 0 || callbackType > CALLBACK_LAST) { throw new IllegalArgumentException("callbackType is invalid");