Loading core/java/android/animation/Animator.java +15 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,11 @@ import java.util.ArrayList; */ public abstract class Animator implements Cloneable { /** * The value used to indicate infinite duration (e.g. when Animators repeat infinitely). * @hide */ public static final long DURATION_INFINITE = -1; /** * The set of listeners to be sent events through the life of an animation. */ Loading Loading @@ -183,6 +188,16 @@ public abstract class Animator implements Cloneable { */ public abstract long getDuration(); /** * Gets the total duration of the animation, accounting for animation sequences, start delay, * and repeating. Return {@link #DURATION_INFINITE} if the duration is infinite. * @hide * TODO: Unhide */ public long getTotalDuration() { return getStartDelay() + getDuration(); } /** * The time interpolator used in calculating the elapsed fraction of the * animation. The interpolator determines whether the animation runs with Loading core/java/android/animation/AnimatorSet.java +460 −463 File changed.Preview size limit exceeded, changes collapsed. Show changes core/java/android/animation/ValueAnimator.java +12 −0 Original line number Diff line number Diff line Loading @@ -574,6 +574,18 @@ public class ValueAnimator extends Animator { return mUnscaledDuration; } /** * @hide */ @Override public long getTotalDuration() { if (mRepeatCount == INFINITE) { return DURATION_INFINITE; } else { return mUnscaledStartDelay + (mUnscaledDuration * (mRepeatCount + 1)); } } /** * Sets the position of the animation to the specified point in time. This time should * be between 0 and the total duration of the animation, including any repetition. If Loading core/java/android/view/RenderNodeAnimator.java +8 −0 Original line number Diff line number Diff line Loading @@ -336,6 +336,14 @@ public class RenderNodeAnimator extends Animator { return mUnscaledDuration; } /** * @hide */ @Override public long getTotalDuration() { return mUnscaledDuration + mUnscaledStartDelay; } @Override public boolean isRunning() { return mState == STATE_DELAYED || mState == STATE_RUNNING; Loading Loading
core/java/android/animation/Animator.java +15 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,11 @@ import java.util.ArrayList; */ public abstract class Animator implements Cloneable { /** * The value used to indicate infinite duration (e.g. when Animators repeat infinitely). * @hide */ public static final long DURATION_INFINITE = -1; /** * The set of listeners to be sent events through the life of an animation. */ Loading Loading @@ -183,6 +188,16 @@ public abstract class Animator implements Cloneable { */ public abstract long getDuration(); /** * Gets the total duration of the animation, accounting for animation sequences, start delay, * and repeating. Return {@link #DURATION_INFINITE} if the duration is infinite. * @hide * TODO: Unhide */ public long getTotalDuration() { return getStartDelay() + getDuration(); } /** * The time interpolator used in calculating the elapsed fraction of the * animation. The interpolator determines whether the animation runs with Loading
core/java/android/animation/AnimatorSet.java +460 −463 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/java/android/animation/ValueAnimator.java +12 −0 Original line number Diff line number Diff line Loading @@ -574,6 +574,18 @@ public class ValueAnimator extends Animator { return mUnscaledDuration; } /** * @hide */ @Override public long getTotalDuration() { if (mRepeatCount == INFINITE) { return DURATION_INFINITE; } else { return mUnscaledStartDelay + (mUnscaledDuration * (mRepeatCount + 1)); } } /** * Sets the position of the animation to the specified point in time. This time should * be between 0 and the total duration of the animation, including any repetition. If Loading
core/java/android/view/RenderNodeAnimator.java +8 −0 Original line number Diff line number Diff line Loading @@ -336,6 +336,14 @@ public class RenderNodeAnimator extends Animator { return mUnscaledDuration; } /** * @hide */ @Override public long getTotalDuration() { return mUnscaledDuration + mUnscaledStartDelay; } @Override public boolean isRunning() { return mState == STATE_DELAYED || mState == STATE_RUNNING; Loading