Search in sources :

Example 21 with ConfigurationStats

use of android.app.usage.ConfigurationStats in project android_frameworks_base by crdroidandroid.

the class IntervalStats method getOrCreateConfigurationStats.

/**
     * Gets the ConfigurationStats object for the given configuration, or creates one and adds it
     * internally.
     */
ConfigurationStats getOrCreateConfigurationStats(Configuration config) {
    ConfigurationStats configStats = configurations.get(config);
    if (configStats == null) {
        configStats = new ConfigurationStats();
        configStats.mBeginTimeStamp = beginTime;
        configStats.mEndTimeStamp = endTime;
        configStats.mConfiguration = config;
        configurations.put(config, configStats);
    }
    return configStats;
}
Also used : ConfigurationStats(android.app.usage.ConfigurationStats)

Aggregations

ConfigurationStats (android.app.usage.ConfigurationStats)21 Configuration (android.content.res.Configuration)13 IUsageStatsManager (android.app.usage.IUsageStatsManager)5 RemoteException (android.os.RemoteException)5 ArrayMap (android.util.ArrayMap)5 ArrayList (java.util.ArrayList)5 Comparator (java.util.Comparator)5 UsageEvents (android.app.usage.UsageEvents)4 Event (android.app.usage.UsageEvents.Event)4 UsageStats (android.app.usage.UsageStats)4