diff --git a/core/api/current.txt b/core/api/current.txt index 0192ff063ac09..a10476a287f3b 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -47545,15 +47545,11 @@ package android.view { public final class Choreographer { method public static android.view.Choreographer getInstance(); - method public void postExtendedFrameCallback(@NonNull android.view.Choreographer.ExtendedFrameCallback); method public void postFrameCallback(android.view.Choreographer.FrameCallback); method public void postFrameCallbackDelayed(android.view.Choreographer.FrameCallback, long); - method public void removeExtendedFrameCallback(@Nullable android.view.Choreographer.ExtendedFrameCallback); + method public void postVsyncCallback(@NonNull android.view.Choreographer.VsyncCallback); method public void removeFrameCallback(android.view.Choreographer.FrameCallback); - } - - public static interface Choreographer.ExtendedFrameCallback { - method public void onVsync(@NonNull android.view.Choreographer.FrameData); + method public void removeVsyncCallback(@Nullable android.view.Choreographer.VsyncCallback); } public static interface Choreographer.FrameCallback { @@ -47568,10 +47564,14 @@ package android.view { public static class Choreographer.FrameTimeline { method public long getDeadlineNanos(); - method public long getExpectedPresentTimeNanos(); + method public long getExpectedPresentationTimeNanos(); method public long getVsyncId(); } + public static interface Choreographer.VsyncCallback { + method public void onVsync(@NonNull android.view.Choreographer.FrameData); + } + public interface CollapsibleActionView { method public void onActionViewCollapsed(); method public void onActionViewExpanded(); diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index b8eb6027b09c0..8e3cc34706fc8 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -499,9 +499,9 @@ public final class Choreographer { * * @param callback The extended frame callback to run during the next frame. * - * @see #removeExtendedFrameCallback + * @see #removeVsyncCallback */ - public void postExtendedFrameCallback(@NonNull ExtendedFrameCallback callback) { + public void postVsyncCallback(@NonNull VsyncCallback callback) { if (callback == null) { throw new IllegalArgumentException("callback must not be null"); } @@ -603,9 +603,9 @@ public final class Choreographer { * * @param callback The extended frame callback to remove. * - * @see #postExtendedFrameCallback + * @see #postVsyncCallback */ - public void removeExtendedFrameCallback(@Nullable ExtendedFrameCallback callback) { + public void removeVsyncCallback(@Nullable VsyncCallback callback) { if (callback == null) { throw new IllegalArgumentException("callback must not be null"); } @@ -1021,7 +1021,7 @@ public final class Choreographer { * The time in {@link System#nanoTime()} timebase which this frame is expected to be * presented. */ - public long getExpectedPresentTimeNanos() { + public long getExpectedPresentationTimeNanos() { return mExpectedPresentTimeNanos; } @@ -1034,7 +1034,7 @@ public final class Choreographer { } /** - * The payload for {@link ExtendedFrameCallback} which includes frame information such as when + * The payload for {@link VsyncCallback} which includes frame information such as when * the frame started being rendered, and multiple possible frame timelines and their * information including deadline and expected present time. */ @@ -1101,7 +1101,7 @@ public final class Choreographer { * * @see FrameCallback */ - public interface ExtendedFrameCallback { + public interface VsyncCallback { /** * Called when a new display frame is being rendered. * @@ -1214,7 +1214,7 @@ public final class Choreographer { void run(FrameData frameData) { if (token == EXTENDED_FRAME_CALLBACK_TOKEN) { - ((ExtendedFrameCallback) action).onVsync(frameData); + ((VsyncCallback) action).onVsync(frameData); } else { run(frameData.getFrameTimeNanos()); }