Loading core/api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -3415,7 +3415,9 @@ package android.view { } public final class Choreographer { method public long getExpectedPresentationTimeNanos(); method public static long getFrameDelay(); method public long getFrameTimeNanos(); method public void postCallback(int, Runnable, Object); method public void postCallbackDelayed(int, Runnable, Object, long); method public void removeCallbacks(int, Runnable, Object); Loading core/java/android/view/Choreographer.java +22 −0 Original line number Diff line number Diff line Loading @@ -693,6 +693,7 @@ public final class Choreographer { * @throws IllegalStateException if no frame is in progress. * @hide */ @TestApi @UnsupportedAppUsage public long getFrameTimeNanos() { synchronized (mLock) { Loading @@ -716,6 +717,27 @@ public final class Choreographer { } } /** * Gets the time in {@link System#nanoTime()} timebase which the current frame * is expected to be presented. * <p> * This time should be used to advance any animation clocks. * Prefer using this method over {@link #getFrameTimeNanos()}. * </p><p> * This method should only be called from within a callback. * </p> * * @return The frame start time, in the {@link System#nanoTime()} time base. * * @throws IllegalStateException if no frame is in progress. * @hide */ @TestApi @UnsupportedAppUsage public long getExpectedPresentationTimeNanos() { return mFrameData.getPreferredFrameTimeline().getExpectedPresentationTimeNanos(); } private void scheduleFrameLocked(long now) { if (!mFrameScheduled) { mFrameScheduled = true; Loading Loading
core/api/test-current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -3415,7 +3415,9 @@ package android.view { } public final class Choreographer { method public long getExpectedPresentationTimeNanos(); method public static long getFrameDelay(); method public long getFrameTimeNanos(); method public void postCallback(int, Runnable, Object); method public void postCallbackDelayed(int, Runnable, Object, long); method public void removeCallbacks(int, Runnable, Object); Loading
core/java/android/view/Choreographer.java +22 −0 Original line number Diff line number Diff line Loading @@ -693,6 +693,7 @@ public final class Choreographer { * @throws IllegalStateException if no frame is in progress. * @hide */ @TestApi @UnsupportedAppUsage public long getFrameTimeNanos() { synchronized (mLock) { Loading @@ -716,6 +717,27 @@ public final class Choreographer { } } /** * Gets the time in {@link System#nanoTime()} timebase which the current frame * is expected to be presented. * <p> * This time should be used to advance any animation clocks. * Prefer using this method over {@link #getFrameTimeNanos()}. * </p><p> * This method should only be called from within a callback. * </p> * * @return The frame start time, in the {@link System#nanoTime()} time base. * * @throws IllegalStateException if no frame is in progress. * @hide */ @TestApi @UnsupportedAppUsage public long getExpectedPresentationTimeNanos() { return mFrameData.getPreferredFrameTimeline().getExpectedPresentationTimeNanos(); } private void scheduleFrameLocked(long now) { if (!mFrameScheduled) { mFrameScheduled = true; Loading