Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e67a55d8 authored by Rachel Lee's avatar Rachel Lee
Browse files

Rename to VsyncCallback and Presentation time.

Only public java choreographer API changes for small CL.

Bug: 217370454
Test: atest ChoreographerTest
Change-Id: Ibe5cecb5a6f16e2694c038cddc31d0f233741d07
parent 2dfd2061
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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();
+8 −8
Original line number Diff line number Diff line
@@ -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());
            }