Loading core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -54519,8 +54519,8 @@ package android.view.animation { public class AnimationUtils { ctor public AnimationUtils(); method public static long currentAnimationTimeMillis(); 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 @FlaggedApi("android.view.flags.expected_presentation_time_read_only") public static long getExpectedPresentationTimeMillis(); method @FlaggedApi("android.view.flags.expected_presentation_time_read_only") 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/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3622,7 +3622,7 @@ package android.view.accessibility { package android.view.animation { public class AnimationUtils { method @FlaggedApi("android.view.flags.expected_presentation_time_api") public static void lockAnimationClock(long, long); method @FlaggedApi("android.view.flags.expected_presentation_time_read_only") public static void lockAnimationClock(long, long); method public static void unlockAnimationClock(); } Loading core/java/android/view/animation/AnimationUtils.java +12 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ package android.view.animation; import static android.view.flags.Flags.FLAG_EXPECTED_PRESENTATION_TIME_API; import static android.view.flags.Flags.expectedPresentationTimeApi; import static android.view.flags.Flags.FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY; import static android.view.flags.Flags.expectedPresentationTimeReadOnly; import android.annotation.AnimRes; import android.annotation.FlaggedApi; Loading Loading @@ -67,6 +67,11 @@ public class AnimationUtils { @Overridable public static final long OVERRIDE_ENABLE_EXPECTED_PRSENTATION_TIME = 278730197L; private static boolean sExpectedPresentationTimeFlagValue; static { sExpectedPresentationTimeFlagValue = expectedPresentationTimeReadOnly(); } private static class AnimationState { boolean animationClockLocked; long currentVsyncTimeMillis; Loading Loading @@ -108,12 +113,12 @@ public class AnimationUtils { * @hide */ @TestApi @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY) public static void lockAnimationClock(long vsyncMillis, long expectedPresentationTimeNanos) { AnimationState state = sAnimationState.get(); state.animationClockLocked = true; state.currentVsyncTimeMillis = vsyncMillis; if (!expectedPresentationTimeApi()) { if (!sExpectedPresentationTimeFlagValue) { state.mExpectedPresentationTimeNanos = expectedPresentationTimeNanos; } } Loading Loading @@ -158,9 +163,9 @@ public class AnimationUtils { * @return the expected presentation time of a frame in the * {@link System#nanoTime()} time base. */ @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY) public static long getExpectedPresentationTimeNanos() { if (!expectedPresentationTimeApi()) { if (!sExpectedPresentationTimeFlagValue) { return SystemClock.uptimeMillis(); } Loading @@ -176,7 +181,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) @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY) public static long getExpectedPresentationTimeMillis() { return getExpectedPresentationTimeNanos() / TimeUtils.NANOS_PER_MS; } Loading core/java/android/view/flags/refresh_rate_flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,14 @@ flag { bug: "278730197" } flag { name: "expected_presentation_time_read_only" namespace: "toolkit" description: "Feature flag for using expected presentation time of the Choreographer" bug: "278730197" is_fixed_read_only: true } flag { name: "set_frame_rate_callback" namespace: "core_graphics" Loading Loading
core/api/current.txt +2 −2 Original line number Diff line number Diff line Loading @@ -54519,8 +54519,8 @@ package android.view.animation { public class AnimationUtils { ctor public AnimationUtils(); method public static long currentAnimationTimeMillis(); 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 @FlaggedApi("android.view.flags.expected_presentation_time_read_only") public static long getExpectedPresentationTimeMillis(); method @FlaggedApi("android.view.flags.expected_presentation_time_read_only") 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/api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -3622,7 +3622,7 @@ package android.view.accessibility { package android.view.animation { public class AnimationUtils { method @FlaggedApi("android.view.flags.expected_presentation_time_api") public static void lockAnimationClock(long, long); method @FlaggedApi("android.view.flags.expected_presentation_time_read_only") public static void lockAnimationClock(long, long); method public static void unlockAnimationClock(); } Loading
core/java/android/view/animation/AnimationUtils.java +12 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ package android.view.animation; import static android.view.flags.Flags.FLAG_EXPECTED_PRESENTATION_TIME_API; import static android.view.flags.Flags.expectedPresentationTimeApi; import static android.view.flags.Flags.FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY; import static android.view.flags.Flags.expectedPresentationTimeReadOnly; import android.annotation.AnimRes; import android.annotation.FlaggedApi; Loading Loading @@ -67,6 +67,11 @@ public class AnimationUtils { @Overridable public static final long OVERRIDE_ENABLE_EXPECTED_PRSENTATION_TIME = 278730197L; private static boolean sExpectedPresentationTimeFlagValue; static { sExpectedPresentationTimeFlagValue = expectedPresentationTimeReadOnly(); } private static class AnimationState { boolean animationClockLocked; long currentVsyncTimeMillis; Loading Loading @@ -108,12 +113,12 @@ public class AnimationUtils { * @hide */ @TestApi @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY) public static void lockAnimationClock(long vsyncMillis, long expectedPresentationTimeNanos) { AnimationState state = sAnimationState.get(); state.animationClockLocked = true; state.currentVsyncTimeMillis = vsyncMillis; if (!expectedPresentationTimeApi()) { if (!sExpectedPresentationTimeFlagValue) { state.mExpectedPresentationTimeNanos = expectedPresentationTimeNanos; } } Loading Loading @@ -158,9 +163,9 @@ public class AnimationUtils { * @return the expected presentation time of a frame in the * {@link System#nanoTime()} time base. */ @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_API) @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY) public static long getExpectedPresentationTimeNanos() { if (!expectedPresentationTimeApi()) { if (!sExpectedPresentationTimeFlagValue) { return SystemClock.uptimeMillis(); } Loading @@ -176,7 +181,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) @FlaggedApi(FLAG_EXPECTED_PRESENTATION_TIME_READ_ONLY) public static long getExpectedPresentationTimeMillis() { return getExpectedPresentationTimeNanos() / TimeUtils.NANOS_PER_MS; } Loading
core/java/android/view/flags/refresh_rate_flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,14 @@ flag { bug: "278730197" } flag { name: "expected_presentation_time_read_only" namespace: "toolkit" description: "Feature flag for using expected presentation time of the Choreographer" bug: "278730197" is_fixed_read_only: true } flag { name: "set_frame_rate_callback" namespace: "core_graphics" Loading