Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -54946,6 +54946,7 @@ 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 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; core/java/android/view/animation/AnimationUtils.java +13 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.content.res.Resources.Theme; import android.content.res.XmlResourceParser; import android.os.SystemClock; import android.util.AttributeSet; import android.util.TimeUtils; import android.util.Xml; import android.view.InflateException; Loading Loading @@ -155,6 +156,18 @@ public class AnimationUtils { return state.mExpectedPresentationTimeNanos; } /** * The expected presentation time of a frame in the {@link SystemClock#uptimeMillis()}. * Developers should prefer using this method over {@link #currentAnimationTimeMillis()} * because it offers a more accurate time for the calculating animation progress. * * @return the expected presentation time of a frame in the * {@link SystemClock#uptimeMillis()} time base. */ public static long getExpectedPresentationTimeMillis() { return getExpectedPresentationTimeNanos() / TimeUtils.NANOS_PER_MS; } /** * Loads an {@link Animation} object from a resource * Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -54946,6 +54946,7 @@ 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 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;
core/java/android/view/animation/AnimationUtils.java +13 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import android.content.res.Resources.Theme; import android.content.res.XmlResourceParser; import android.os.SystemClock; import android.util.AttributeSet; import android.util.TimeUtils; import android.util.Xml; import android.view.InflateException; Loading Loading @@ -155,6 +156,18 @@ public class AnimationUtils { return state.mExpectedPresentationTimeNanos; } /** * The expected presentation time of a frame in the {@link SystemClock#uptimeMillis()}. * Developers should prefer using this method over {@link #currentAnimationTimeMillis()} * because it offers a more accurate time for the calculating animation progress. * * @return the expected presentation time of a frame in the * {@link SystemClock#uptimeMillis()} time base. */ public static long getExpectedPresentationTimeMillis() { return getExpectedPresentationTimeNanos() / TimeUtils.NANOS_PER_MS; } /** * Loads an {@link Animation} object from a resource * Loading