Android APIs
public final class

ConfigurationStats

extends Object
implements Parcelable
java.lang.Object
   ↳ android.app.usage.ConfigurationStats

Class Overview

Represents the usage statistics of a device Configuration for a specific time range.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ConfigurationStats> CREATOR
Public Constructors
ConfigurationStats(ConfigurationStats stats)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
int getActivationCount()
Get the number of times this configuration was active.
Configuration getConfiguration()
long getFirstTimeStamp()
Get the beginning of the time range this ConfigurationStats represents, measured in milliseconds since the epoch.
long getLastTimeActive()
Get the last time this configuration was active, measured in milliseconds since the epoch.
long getLastTimeStamp()
Get the end of the time range this ConfigurationStats represents, measured in milliseconds since the epoch.
long getTotalTimeActive()
Get the total time this configuration was active, measured in milliseconds.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<ConfigurationStats> CREATOR

Added in API level 21

Public Constructors

public ConfigurationStats (ConfigurationStats stats)

Added in API level 21

Public Methods

public int describeContents ()

Added in API level 21

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public int getActivationCount ()

Added in API level 21

Get the number of times this configuration was active.

public Configuration getConfiguration ()

Added in API level 21

public long getFirstTimeStamp ()

Added in API level 21

Get the beginning of the time range this ConfigurationStats represents, measured in milliseconds since the epoch.

See currentTimeMillis().

public long getLastTimeActive ()

Added in API level 21

Get the last time this configuration was active, measured in milliseconds since the epoch.

See currentTimeMillis().

public long getLastTimeStamp ()

Added in API level 21

Get the end of the time range this ConfigurationStats represents, measured in milliseconds since the epoch.

See currentTimeMillis().

public long getTotalTimeActive ()

Added in API level 21

Get the total time this configuration was active, measured in milliseconds.

public void writeToParcel (Parcel dest, int flags)

Added in API level 21

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.