Added in API level 21
Deprecated in API level 34

WindowAnimationFrameStats


class WindowAnimationFrameStats : FrameStats, 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 getStartTimeNano() to 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 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 getFramePresentedTimeNano(int).

Summary

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Long UNDEFINED_TIME_NANO

Undefined time.

Public methods
Int

String

Unit
writeToParcel(parcel: Parcel, flags: Int)

Inherited functions
Long getEndTimeNano()

Gets the end time of the interval for which these statistics apply. The end interval is the time when the last frame was presented.

Int getFrameCount()

Gets the number of frames for which there is data.

Long getFramePresentedTimeNano(index: Int)

Get the time a frame at a given index was presented.

Long getRefreshPeriodNano()

Gets the refresh period of the display hosting the window(s) for which these statistics apply.

Long getStartTimeNano()

Gets the start time of the interval for which these statistics apply. The start interval is the time when the first frame was presented.

Public methods

describeContents

Added in API level 21
fun describeContents(): Int

Deprecated: Deprecated in Java.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

toString

Added in API level 21
fun toString(): String

Deprecated: Deprecated in Java.

Return
String a string representation of the object.

writeToParcel

Added in API level 21
fun writeToParcel(
    parcel: Parcel,
    flags: Int
): Unit

Deprecated: Deprecated in Java.

Parameters
dest The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 21
static val CREATOR: Parcelable.Creator<WindowAnimationFrameStats!>

Deprecated: Deprecated in Java.