/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | RecentAppStatsMixinTest.java | 30 import android.app.usage.UsageStats; 113 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 114 final UsageStats stat1 = new UsageStats(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 134 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 135 final UsageStats stat1 = new UsageStats(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 136 final UsageStats stat2 = new UsageStats(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 137 final UsageStats stat3 = new UsageStats(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 169 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 170 final UsageStats stat1 = new UsageStats(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 171 final UsageStats stat2 = new UsageStats(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() [all …]
|
D | AppsPreferenceControllerTest.java | 34 import android.app.usage.UsageStats; 145 final UsageStats stat1 = new UsageStats(); in initRecentApps() 146 final UsageStats stat2 = new UsageStats(); in initRecentApps() 147 final UsageStats stat3 = new UsageStats(); in initRecentApps() 169 UsageStats stats) { in statsWrapperOf()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/ |
D | RecentAppsPreferenceControllerTest.java | 36 import android.app.usage.UsageStats; 140 final List<UsageStats> stats = new ArrayList<>(); in display_showRecents() 141 final UsageStats stat1 = new UsageStats(); in display_showRecents() 142 final UsageStats stat2 = new UsageStats(); in display_showRecents() 143 final UsageStats stat3 = new UsageStats(); in display_showRecents() 179 final List<UsageStats> stats = new ArrayList<>(); in display_showRecentsWithInstantApp() 180 final UsageStats stat1 = new UsageStats(); in display_showRecentsWithInstantApp() 186 final UsageStats stat2 = new UsageStats(); in display_showRecentsWithInstantApp() 221 final List<UsageStats> stats = new ArrayList<>(); in display_showRecentsWithNullAppEntryOrInfo() 222 final UsageStats stat1 = new UsageStats(); in display_showRecentsWithNullAppEntryOrInfo() [all …]
|
/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/device/apps/ |
D | RecentAppsPreferenceController.java | 20 import android.app.usage.UsageStats; 53 implements Comparator<UsageStats> { 69 private List<UsageStats> mStats; 117 final List<UsageStats> recentApps = getDisplayableRecentAppList(); in update() 129 private void displayRecentApps(List<UsageStats> recentApps) { in displayRecentApps() 133 final UsageStats stat = recentApps.get(i); in displayRecentApps() 157 public final int compare(UsageStats a, UsageStats b) { in compare() 171 private List<UsageStats> getDisplayableRecentAppList() { in getDisplayableRecentAppList() 172 final List<UsageStats> recentApps = new ArrayList<>(); in getDisplayableRecentAppList() 173 final Map<String, UsageStats> map = new ArrayMap<>(); in getDisplayableRecentAppList() [all …]
|
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/ |
D | RecentAppsGroupPreferenceControllerTest.java | 27 import android.app.usage.UsageStats; 114 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isUnavailable() 124 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isUnavailable_zoneWrite() 135 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isUnavailable_zoneRead() 146 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isUnavailable_zoneHidden() 157 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable() 158 usageStats.add(new UsageStats()); in onRecentAppsCallback_notEmpty_isUnavailable() 168 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable_zoneWrite() 169 usageStats.add(new UsageStats()); in onRecentAppsCallback_notEmpty_isUnavailable_zoneWrite() 180 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable_zoneRead() [all …]
|
D | RecentAppsListPreferenceControllerTest.java | 27 import android.app.usage.UsageStats; 107 UsageStats usageStats = createUsageStats(MOCK_PACKAGE_NAME_1); in onRecentAppsLoaded_displaysApps() 108 List<UsageStats> mUsageStatsList = new ArrayList<>(); in onRecentAppsLoaded_displaysApps() 124 UsageStats usageStats1 = createUsageStats(MOCK_PACKAGE_NAME_1); in onRecentAppsLoaded_doesNotDisplayInvalidApps() 125 UsageStats usageStats2 = createUsageStats(MOCK_PACKAGE_NAME_2); in onRecentAppsLoaded_doesNotDisplayInvalidApps() 126 List<UsageStats> mUsageStatsList = new ArrayList<>(); in onRecentAppsLoaded_doesNotDisplayInvalidApps() 144 UsageStats usageStats1 = createUsageStats(MOCK_PACKAGE_NAME_1); in onRecentAppsLoaded_moreThanMaximumAllowed_maximumShown() 145 UsageStats usageStats2 = createUsageStats(MOCK_PACKAGE_NAME_2); in onRecentAppsLoaded_moreThanMaximumAllowed_maximumShown() 146 UsageStats usageStats3 = createUsageStats(MOCK_PACKAGE_NAME_3); in onRecentAppsLoaded_moreThanMaximumAllowed_maximumShown() 147 UsageStats usageStats4 = createUsageStats(MOCK_PACKAGE_NAME_4); in onRecentAppsLoaded_moreThanMaximumAllowed_maximumShown() [all …]
|
D | AllAppsPreferenceControllerTest.java | 27 import android.app.usage.UsageStats; 115 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isAvailable() 125 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isAvailable_zoneWrite() 136 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isAvailable_zoneRead() 147 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isAvailable_zoneHidden() 158 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable() 159 usageStats.add(new UsageStats()); in onRecentAppsCallback_notEmpty_isUnavailable() 169 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable_zoneWrite() 170 usageStats.add(new UsageStats()); in onRecentAppsCallback_notEmpty_isUnavailable_zoneWrite() 181 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable_zoneRead() [all …]
|
D | RecentAppsItemManagerTest.java | 28 import android.app.usage.UsageStats; 85 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 86 final UsageStats stat1 = createUsageStats(MOCK_PACKAGE_NAME_1); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 104 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 105 final UsageStats stat1 = createUsageStats(MOCK_PACKAGE_NAME_1); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 106 final UsageStats stat2 = createUsageStats(MOCK_PACKAGE_NAME_2); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 107 final UsageStats stat3 = createUsageStats(MOCK_PACKAGE_NAME_3); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 132 private UsageStats createUsageStats(String packageName) { in createUsageStats() 133 UsageStats usageStats = new UsageStats(); in createUsageStats()
|
/packages/apps/Car/Settings/src/com/android/car/settings/applications/ |
D | RecentAppsItemManager.java | 20 import android.app.usage.UsageStats; 50 public class RecentAppsItemManager implements Comparator<UsageStats> { 55 final List<UsageStats> mRecentApps; 103 public final int compare(UsageStats a, UsageStats b) { in compare() 120 List<UsageStats> mStats = mUsageStatsManager.queryUsageStats( in loadDisplayableRecentApps() 124 Map<String, UsageStats> map = new ArrayMap<>(); in loadDisplayableRecentApps() 125 for (UsageStats pkgStats : mStats) { in loadDisplayableRecentApps() 130 UsageStats existingStats = map.get(pkgName); in loadDisplayableRecentApps() 137 List<UsageStats> packageStats = new ArrayList<>(); in loadDisplayableRecentApps() 141 for (UsageStats stat : packageStats) { in loadDisplayableRecentApps() [all …]
|
D | RecentAppsListPreferenceController.java | 20 import android.app.usage.UsageStats; 48 private List<UsageStats> mRecentAppStats; 70 public void onRecentAppStatsLoaded(List<UsageStats> recentAppStats) { in onRecentAppStatsLoaded() 86 for (UsageStats usageStats : mRecentAppStats) { in updateState() 99 private Preference createPreference(Context context, UsageStats usageStats) { in createPreference()
|
D | RecentAppsGroupPreferenceController.java | 19 import android.app.usage.UsageStats; 56 public void onRecentAppStatsLoaded(List<UsageStats> recentAppStats) { in onRecentAppStatsLoaded()
|
D | AllAppsPreferenceController.java | 19 import android.app.usage.UsageStats; 59 public void onRecentAppStatsLoaded(List<UsageStats> recentAppStats) { in onRecentAppStatsLoaded()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/ |
D | RecentAppsPreferenceController.java | 20 import android.app.usage.UsageStats; 55 implements Comparator<UsageStats> { 71 private List<UsageStats> mStats; 120 final List<UsageStats> recentApps = getDisplayableRecentAppList(); in refreshUi() 139 private void displayRecentApps(Context prefContext, List<UsageStats> recentApps) { in displayRecentApps() 155 final UsageStats stat = recentApps.get(i); in displayRecentApps() 201 public final int compare(UsageStats a, UsageStats b) { in compare() 215 private List<UsageStats> getDisplayableRecentAppList() { in getDisplayableRecentAppList() 216 final List<UsageStats> recentApps = new ArrayList<>(); in getDisplayableRecentAppList() 217 final Map<String, UsageStats> map = new ArrayMap<>(); in getDisplayableRecentAppList() [all …]
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | RecentAppStatsMixin.java | 23 import android.app.usage.UsageStats; 134 List<UsageStats> profileStats = usageStatsManager in loadDisplayableRecentApps() 148 private List<UsageStats> getRecentAppsStats(UsageStatsManager usageStatsManager, int userId) { in getRecentAppsStats() 149 final List<UsageStats> recentAppStats = mPowerManager.isPowerSaveMode() in getRecentAppsStats() 155 final Map<String, UsageStats> map = new ArrayMap<>(); in getRecentAppsStats() 156 for (final UsageStats pkgStats : recentAppStats) { in getRecentAppsStats() 161 final UsageStats existingStats = map.get(pkgName); in getRecentAppsStats() 168 final List<UsageStats> packageStats = new ArrayList<>(map.values()); in getRecentAppsStats() 169 packageStats.sort(Comparator.comparingLong(UsageStats::getLastTimeUsed).reversed()); in getRecentAppsStats() 176 private boolean shouldIncludePkgInRecents(UsageStats stat, int userId) { in shouldIncludePkgInRecents() [all …]
|
D | AppsPreferenceController.java | 22 import android.app.usage.UsageStats; 188 final UsageStats stats = statsWrapper.mUsageStats; in displayRecentApps()
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
D | AppsAsyncLoader.java | 19 import android.app.usage.UsageStats; 104 final Map<String, UsageStats> map = in loadApps() 106 final Map<String, UsageStats> alternateMap = in loadApps() 120 UsageStats usageStats = map.get(app.packageName); in loadApps() 121 UsageStats alternateUsageStats = alternateMap.get(app.packageName); in loadApps() 160 UsageStats getGreaterUsageStats(String packageName, UsageStats primary, UsageStats alternate) { in getGreaterUsageStats() 179 private Map<String, UsageStats> getLatestUsageStatsByPackageName(long startTime, long endTime) { in getLatestUsageStatsByPackageName() 180 List<UsageStats> usageStats = in getLatestUsageStatsByPackageName() 183 Map<String, List<UsageStats>> groupedByPackageName = in getLatestUsageStatsByPackageName() 184 usageStats.stream().collect(Collectors.groupingBy(UsageStats::getPackageName)); in getLatestUsageStatsByPackageName() [all …]
|
D | AppStateUsageStatsBridge.java | 18 import android.app.usage.UsageStats; 73 final Map<String, UsageStats> map = getAggregatedUsageStats(); in loadAllExtraInfo() 75 UsageStats usageStats = map.get(entry.info.packageName); in loadAllExtraInfo() 84 Map<String, UsageStats> map = getAggregatedUsageStats(); in updateExtraInfo() 85 UsageStats usageStats = map.get(app.info.packageName); in updateExtraInfo() 91 private long getDaysSinceLastUse(UsageStats stats) { in getDaysSinceLastUse() 123 private Map<String, UsageStats> getAggregatedUsageStats() { in getAggregatedUsageStats()
|
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/ |
D | AppsAsyncLoaderTest.java | 19 import android.app.usage.UsageStats; 71 private HashMap<String, UsageStats> mUsageStats; 306 UsageStats secondary = mock(UsageStats.class); in test_getGreaterUsageStats_primaryIsNull() 314 UsageStats primary = mock(UsageStats.class); in test_getGreaterUsageStats_secondaryIsNull() 321 UsageStats primary = mock(UsageStats.class); in test_getGreaterUsageStats_primaryIsGreater() 323 UsageStats secondary = mock(UsageStats.class); in test_getGreaterUsageStats_primaryIsGreater() 331 UsageStats primary = mock(UsageStats.class); in test_getGreaterUsageStats_secondaryIsGreater() 333 UsageStats secondary = mock(UsageStats.class); in test_getGreaterUsageStats_secondaryIsGreater() 388 UsageStats usageStats = mock(UsageStats.class); in registerLastUse()
|
D | AppStateUsageStatsBridgeTest.java | 19 import android.app.usage.UsageStats; 67 private HashMap<String, UsageStats> mUsageStats; 412 UsageStats usageStats = mock(UsageStats.class); in registerLastUse()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | UsageStatsLiveData.kt | 20 import android.app.usage.UsageStats in <lambda>() 41 ) : SmartAsyncMediatorLiveData<Map<UserHandle, List<UsageStats>>>() { in <lambda>() 53 val userMap = mutableMapOf<UserHandle, List<UsageStats>>() in <lambda>()
|
/packages/apps/Settings/src/com/android/settings/spa/development/ |
D | UsageStatsListModel.kt | 19 import android.app.usage.UsageStats in <lambda>() 40 val usageStats: UsageStats?, in <lambda>() 88 private fun UsageStats.getLastUsedString() = when { in <lambda>() method 100 private fun getUsageStats(): Map<String, UsageStats> { in <lambda>()
|
/packages/modules/ExtServices/java/tests/src/android/ext/services/storage/ |
D | CacheQuotaServiceImplTest.java | 24 import android.app.usage.UsageStats; 157 UsageStats stats = new UsageStats.Builder() in makeNewRequest()
|
/packages/modules/IntentResolver/java/src/com/android/intentresolver/model/ |
D | ResolverRankerServiceResolverComparator.java | 20 import android.app.usage.UsageStats; 82 private final Map<UserHandle, Map<String, UsageStats>> mStatsPerUser; 199 final Map<String, UsageStats> stats = mStatsPerUser.get(resolvedComponentUserSpace); in doCompute() 202 final UsageStats pkStats = stats.get(target.name.getPackageName()); in doCompute() 558 private final Map<UserHandle, Map<String, UsageStats>> mStatsPerUser; // Treat as immutable. 572 Map<UserHandle, Map<String, UsageStats>> statsPerUser, in ResolverRankerServiceComparatorModel()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/model/ |
D | UnusedAppsViewModel.kt | 21 import android.app.usage.UsageStats in <lambda>() 134 it: UsageStats -> in <lambda>()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/hibernation/ |
D | HibernationPolicy.kt | 40 import android.app.usage.UsageStats in <lambda>() 522 fun UsageStats.lastTimePackageUsed(): Long { in UsageStats() method 530 private fun List<UsageStats>.lastTimePackageUsed(pkgNames: List<String>): Long { in List() 540 private fun List<UsageStats>.lastTimePackageUsed(pkgName: String): Long { in List()
|