FileDocCategorySizeDatePackage
ConfigurationStats.javaAPI DocAndroid 5.1 API4376Thu Mar 12 22:22:10 GMT 2015android.app.usage

ConfigurationStats

public final class ConfigurationStats extends Object implements android.os.Parcelable
Represents the usage statistics of a device {@link android.content.res.Configuration} for a specific time range.

Fields Summary
public android.content.res.Configuration
mConfiguration
{@hide}
public long
mBeginTimeStamp
{@hide}
public long
mEndTimeStamp
{@hide}
public long
mLastTimeActive
{@hide}
public long
mTotalTimeActive
{@hide}
public int
mActivationCount
{@hide}
public static final Creator
CREATOR
Constructors Summary
public ConfigurationStats()
{@hide}

    
public ConfigurationStats(ConfigurationStats stats)

        mConfiguration = stats.mConfiguration;
        mBeginTimeStamp = stats.mBeginTimeStamp;
        mEndTimeStamp = stats.mEndTimeStamp;
        mLastTimeActive = stats.mLastTimeActive;
        mTotalTimeActive = stats.mTotalTimeActive;
        mActivationCount = stats.mActivationCount;
    
Methods Summary
public intdescribeContents()

        return 0;
    
public intgetActivationCount()
Get the number of times this configuration was active.

        return mActivationCount;
    
public android.content.res.ConfigurationgetConfiguration()

        return mConfiguration;
    
public longgetFirstTimeStamp()
Get the beginning of the time range this {@link ConfigurationStats} represents, measured in milliseconds since the epoch.

See {@link System#currentTimeMillis()}.

        return mBeginTimeStamp;
    
public longgetLastTimeActive()
Get the last time this configuration was active, measured in milliseconds since the epoch.

See {@link System#currentTimeMillis()}.

        return mLastTimeActive;
    
public longgetLastTimeStamp()
Get the end of the time range this {@link ConfigurationStats} represents, measured in milliseconds since the epoch.

See {@link System#currentTimeMillis()}.

        return mEndTimeStamp;
    
public longgetTotalTimeActive()
Get the total time this configuration was active, measured in milliseconds.

        return mTotalTimeActive;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        if (mConfiguration != null) {
            dest.writeInt(1);
            mConfiguration.writeToParcel(dest, flags);
        } else {
            dest.writeInt(0);
        }

        dest.writeLong(mBeginTimeStamp);
        dest.writeLong(mEndTimeStamp);
        dest.writeLong(mLastTimeActive);
        dest.writeLong(mTotalTimeActive);
        dest.writeInt(mActivationCount);