Lines Matching defs:usageStats
19 import android.app.usage.UsageStats;
105 final Map<String, UsageStats> map =
107 final Map<String, UsageStats> alternateMap =
121 UsageStats usageStats = map.get(app.packageName);
122 UsageStats alternateUsageStats = alternateMap.get(app.packageName);
138 usageStats,
158 UsageStats getGreaterUsageStats(String packageName, UsageStats primary, UsageStats alternate) {
177 private Map<String, UsageStats> getLatestUsageStatsByPackageName(long startTime, long endTime) {
178 List<UsageStats> usageStats =
181 Map<String, List<UsageStats>> groupedByPackageName =
182 usageStats.stream().collect(Collectors.groupingBy(UsageStats::getPackageName));
184 ArrayMap<String, UsageStats> latestStatsByPackageName = new ArrayMap<>();
189 // Flattens the list of UsageStats to only have the latest by
191 (Map.Entry<String, List<UsageStats>> item) -> {
196 (UsageStats o1, UsageStats o2) ->
379 private long getDaysSinceLastUse(UsageStats stats) {