Loading core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -54456,8 +54456,8 @@ package android.view.animation { public class AnimationUtils { ctor public AnimationUtils(); method public static long currentAnimationTimeMillis(); method public static long getExpectedPresentationTimeMillis(); method public static long getExpectedPresentationTimeNanos(); method @FlaggedApi("android.view.flags.expected_presentation_time_api") public static long getExpectedPresentationTimeMillis(); method @FlaggedApi("android.view.flags.expected_presentation_time_api") public static long getExpectedPresentationTimeNanos(); method public static android.view.animation.Animation loadAnimation(android.content.Context, @AnimRes int) throws android.content.res.Resources.NotFoundException; method public static android.view.animation.Interpolator loadInterpolator(android.content.Context, @AnimRes @InterpolatorRes int) throws android.content.res.Resources.NotFoundException; method public static android.view.animation.LayoutAnimationController loadLayoutAnimation(android.content.Context, @AnimRes int) throws android.content.res.Resources.NotFoundException; core/java/android/view/animation/AnimationUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,11 @@ package android.view.animation; import static android.view.flags.Flags.FLAG_EXPECTED_PRESENTATION_TIME_API; import static android.view.flags.Flags.expectedPresentationTimeApi; import android.annotation.AnimRes; import android.annotation.FlaggedApi; import android.annotation.InterpolatorRes; import android.annotation.TestApi; import android.compat.annotation.ChangeId; Loading Loading @@ -151,7 +155,12 @@ public class AnimationUtils { * @return the expected presentation time of a frame in the * {@link System#nanoTime()} time base. */ @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) public static long getExpectedPresentationTimeNanos() { if (!expectedPresentationTimeApi()) { return SystemClock.uptimeMillis(); } AnimationState state = sAnimationState.get(); return state.mExpectedPresentationTimeNanos; } Loading @@ -164,6 +173,7 @@ public class AnimationUtils { * @return the expected presentation time of a frame in the * {@link SystemClock#uptimeMillis()} time base. */ @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) public static long getExpectedPresentationTimeMillis() { return getExpectedPresentationTimeNanos() / TimeUtils.NANOS_PER_MS; } Loading core/java/android/view/flags/variable_refresh_rate_flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -13,3 +13,10 @@ flag { description: "Feature flag for toolkit to set frame rate" bug: "293512962" } flag { name: "expected_presentation_time_api" namespace: "toolkit" description: "Feature flag for using expected presentation time of the Choreographer" bug: "278730197" } No newline at end of file Loading
core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -54456,8 +54456,8 @@ package android.view.animation { public class AnimationUtils { ctor public AnimationUtils(); method public static long currentAnimationTimeMillis(); method public static long getExpectedPresentationTimeMillis(); method public static long getExpectedPresentationTimeNanos(); method @FlaggedApi("android.view.flags.expected_presentation_time_api") public static long getExpectedPresentationTimeMillis(); method @FlaggedApi("android.view.flags.expected_presentation_time_api") public static long getExpectedPresentationTimeNanos(); method public static android.view.animation.Animation loadAnimation(android.content.Context, @AnimRes int) throws android.content.res.Resources.NotFoundException; method public static android.view.animation.Interpolator loadInterpolator(android.content.Context, @AnimRes @InterpolatorRes int) throws android.content.res.Resources.NotFoundException; method public static android.view.animation.LayoutAnimationController loadLayoutAnimation(android.content.Context, @AnimRes int) throws android.content.res.Resources.NotFoundException;
core/java/android/view/animation/AnimationUtils.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,11 @@ package android.view.animation; import static android.view.flags.Flags.FLAG_EXPECTED_PRESENTATION_TIME_API; import static android.view.flags.Flags.expectedPresentationTimeApi; import android.annotation.AnimRes; import android.annotation.FlaggedApi; import android.annotation.InterpolatorRes; import android.annotation.TestApi; import android.compat.annotation.ChangeId; Loading Loading @@ -151,7 +155,12 @@ public class AnimationUtils { * @return the expected presentation time of a frame in the * {@link System#nanoTime()} time base. */ @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) public static long getExpectedPresentationTimeNanos() { if (!expectedPresentationTimeApi()) { return SystemClock.uptimeMillis(); } AnimationState state = sAnimationState.get(); return state.mExpectedPresentationTimeNanos; } Loading @@ -164,6 +173,7 @@ public class AnimationUtils { * @return the expected presentation time of a frame in the * {@link SystemClock#uptimeMillis()} time base. */ @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) public static long getExpectedPresentationTimeMillis() { return getExpectedPresentationTimeNanos() / TimeUtils.NANOS_PER_MS; } Loading
core/java/android/view/flags/variable_refresh_rate_flags.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -13,3 +13,10 @@ flag { description: "Feature flag for toolkit to set frame rate" bug: "293512962" } flag { name: "expected_presentation_time_api" namespace: "toolkit" description: "Feature flag for using expected presentation time of the Choreographer" bug: "278730197" } No newline at end of file