Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a33de554 authored by Chet Haase's avatar Chet Haase
Browse files

Make the TimeAnimator class public.

This class has existed since ICS, but was hidden. This change
just makes it public API.
Also, cleaned up some internal javadocs.

Change-Id: Id69408446ced183e01d2b065a67397eb305d9665
parent 4651c0ea
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -2349,6 +2349,15 @@ package android.animation {
    method public void setPropertyName(java.lang.String);
    method public void setPropertyName(java.lang.String);
  }
  }
  public class TimeAnimator extends android.animation.ValueAnimator {
    ctor public TimeAnimator();
    method public void setTimeListener(android.animation.TimeAnimator.TimeListener);
  }
  public static abstract interface TimeAnimator.TimeListener {
    method public abstract void onTimeUpdate(android.animation.TimeAnimator, long, long);
  }
  public abstract interface TimeInterpolator {
  public abstract interface TimeInterpolator {
    method public abstract float getInterpolation(float);
    method public abstract float getInterpolation(float);
  }
  }
+11 −12
Original line number Original line Diff line number Diff line
package android.animation;
package android.animation;


/**
/**
 * This class provides a simple callback mechanism to listeners that is synchronized with other
 * This class provides a simple callback mechanism to listeners that is synchronized with all
 * animators in the system. There is no duration, interpolation, or object value-setting
 * other animators in the system. There is no duration, interpolation, or object value-setting
 * with this Animator. Instead, it is simply started and proceeds to send out events on every
 * with this Animator. Instead, it is simply started, after which it proceeds to send out events
 * animation frame to its TimeListener (if set), with information about this animator,
 * on every animation frame to its TimeListener (if set), with information about this animator,
 * the total elapsed time, and the time since the last animation frame.
 * the total elapsed time, and the elapsed time since the previous animation frame.
 *
 * @hide
 */
 */
public class TimeAnimator extends ValueAnimator {
public class TimeAnimator extends ValueAnimator {


@@ -59,10 +57,10 @@ public class TimeAnimator extends ValueAnimator {
     * Implementors of this interface can set themselves as update listeners
     * Implementors of this interface can set themselves as update listeners
     * to a <code>TimeAnimator</code> instance to receive callbacks on every animation
     * to a <code>TimeAnimator</code> instance to receive callbacks on every animation
     * frame to receive the total time since the animator started and the delta time
     * frame to receive the total time since the animator started and the delta time
     * since the last frame. The first time the listener is called, totalTime and
     * since the last frame. The first time the listener is called,
     * deltaTime should both be zero.
     * deltaTime will be zero. The same is true for totalTime, unless the animator was
     *
     * set to a specific {@link ValueAnimator#setCurrentPlayTime(long) currentPlayTime}
     * @hide
     * prior to starting.
     */
     */
    public static interface TimeListener {
    public static interface TimeListener {
        /**
        /**
@@ -70,7 +68,8 @@ public class TimeAnimator extends ValueAnimator {
         * along with information about the elapsed time.</p>
         * along with information about the elapsed time.</p>
         *
         *
         * @param animation The animator sending out the notification.
         * @param animation The animator sending out the notification.
         * @param totalTime The
         * @param totalTime The total time elapsed since the animator started, in milliseconds.
         * @param deltaTime The time elapsed since the previous frame, in milliseconds.
         */
         */
        void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime);
        void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime);


+2 −4
Original line number Original line Diff line number Diff line
@@ -2166,15 +2166,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        float mScaleY = 1f;
        float mScaleY = 1f;
        /**
        /**
         * The amount of scale in the x direction around the pivot point. A
         * The x location of the point around which the view is rotated and scaled.
         * value of 1 means no scaling is applied.
         */
         */
        @ViewDebug.ExportedProperty
        @ViewDebug.ExportedProperty
        float mPivotX = 0f;
        float mPivotX = 0f;
        /**
        /**
         * The amount of scale in the y direction around the pivot point. A
         * The y location of the point around which the view is rotated and scaled.
         * value of 1 means no scaling is applied.
         */
         */
        @ViewDebug.ExportedProperty
        @ViewDebug.ExportedProperty
        float mPivotY = 0f;
        float mPivotY = 0f;