FileDocCategorySizeDatePackage
WindowAnimationFrameStats.javaAPI DocAndroid 5.1 API3381Thu Mar 12 22:22:10 GMT 2015android.view

WindowAnimationFrameStats

public final class WindowAnimationFrameStats extends FrameStats implements android.os.Parcelable
This class contains window animation frame statistics. For example, a window animation is usually performed when the application is transitioning from one activity to another. The frame statistics are a snapshot for the time interval from {@link #getStartTimeNano()} to {@link #getEndTimeNano()}.

The key idea is that in order to provide a smooth user experience the system should run window animations at a specific time interval obtained by calling {@link #getRefreshPeriodNano()}. If the system does not render a frame every refresh period the user will see irregular window transitions. The time when the frame was actually presented on the display by calling {@link #getFramePresentedTimeNano(int)}.

Fields Summary
public static final Creator
CREATOR
Constructors Summary
public WindowAnimationFrameStats()

hide

        /* do nothing */
    
private WindowAnimationFrameStats(android.os.Parcel parcel)

        mRefreshPeriodNano = parcel.readLong();
        mFramesPresentedTimeNano = parcel.createLongArray();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public voidinit(long refreshPeriodNano, long[] framesPresentedTimeNano)
Initializes this isntance.

param
refreshPeriodNano The display refresh period.
param
framesPresentedTimeNano The presented frame times.
hide

        mRefreshPeriodNano = refreshPeriodNano;
        mFramesPresentedTimeNano = framesPresentedTimeNano;
    
public java.lang.StringtoString()

        StringBuilder builder = new StringBuilder();
        builder.append("WindowAnimationFrameStats[");
        builder.append("frameCount:" + getFrameCount());
        builder.append(", fromTimeNano:" + getStartTimeNano());
        builder.append(", toTimeNano:" + getEndTimeNano());
        builder.append(']");
        return builder.toString();
    
public voidwriteToParcel(android.os.Parcel parcel, int flags)

        parcel.writeLong(mRefreshPeriodNano);
        parcel.writeLongArray(mFramesPresentedTimeNano);