/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | RecentAppStatsMixinTest.java | 29 import android.app.usage.UsageStats; 94 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 95 final UsageStats stat1 = new UsageStats(); in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp() 115 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 116 final UsageStats stat1 = new UsageStats(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 117 final UsageStats stat2 = new UsageStats(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 118 final UsageStats stat3 = new UsageStats(); in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps() 150 final List<UsageStats> stats = new ArrayList<>(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 151 final UsageStats stat1 = new UsageStats(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() 152 final UsageStats stat2 = new UsageStats(); in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp() [all …]
|
D | AppsPreferenceControllerTest.java | 34 import android.app.usage.UsageStats; 73 private List<UsageStats> mUsageStats; 145 final UsageStats stat1 = new UsageStats(); in initRecentApps() 146 final UsageStats stat2 = new UsageStats(); in initRecentApps() 147 final UsageStats stat3 = new UsageStats(); in initRecentApps()
|
/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/Settings/src/com/android/settings/ |
D | UsageStatsActivity.java | 20 import android.app.usage.UsageStats; 59 public static class AppNameComparator implements Comparator<UsageStats> { 67 public final int compare(UsageStats a, UsageStats b) { in compare() 74 public static class LastTimeUsedComparator implements Comparator<UsageStats> { 76 public final int compare(UsageStats a, UsageStats b) { in compare() 82 public static class UsageTimeComparator implements Comparator<UsageStats> { 84 public final int compare(UsageStats a, UsageStats b) { in compare() 107 private final ArrayList<UsageStats> mPackageStats = new ArrayList<>(); 113 final List<UsageStats> stats = in UsageStatsAdapter() 120 ArrayMap<String, UsageStats> map = new ArrayMap<>(); in UsageStatsAdapter() [all …]
|
/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/Car/Settings/tests/unit/src/com/android/car/settings/applications/ |
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 | 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()
|
D | RecentAppsGroupPreferenceControllerTest.java | 26 import android.app.usage.UsageStats; 86 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isUnavailable() 96 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable() 97 usageStats.add(new UsageStats()); in onRecentAppsCallback_notEmpty_isUnavailable()
|
D | AllAppsPreferenceControllerTest.java | 26 import android.app.usage.UsageStats; 87 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_empty_isAvailable() 97 List<UsageStats> usageStats = new ArrayList<>(); in onRecentAppsCallback_notEmpty_isUnavailable() 98 usageStats.add(new UsageStats()); in onRecentAppsCallback_notEmpty_isUnavailable()
|
D | HibernatedAppsItemManagerTest.java | 33 import android.app.usage.UsageStats; 155 UsageStats us = new UsageStats(); in setAutoRevokedPackageUsageStats()
|
/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 | HibernatedAppsItemManager.java | 21 import android.app.usage.UsageStats; 91 List<UsageStats> usageStatsList = usm.queryUsageStats(INTERVAL_MONTHLY, in getNumHibernated() 93 Map<String, UsageStats> recentlyUsedPackages = new ArrayMap<>(); in getNumHibernated() 94 for (UsageStats us : usageStatsList) { in getNumHibernated() 101 UsageStats usageStats = recentlyUsedPackages.get(packageName); in getNumHibernated()
|
D | RecentAppsListPreferenceController.java | 20 import android.app.usage.UsageStats; 47 private List<UsageStats> mRecentAppStats; 69 public void onRecentAppStatsLoaded(List<UsageStats> recentAppStats) { in onRecentAppStatsLoaded() 85 for (UsageStats usageStats : mRecentAppStats) { in updateState() 98 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/Settings/src/com/android/settings/applications/ |
D | RecentAppStatsMixin.java | 22 import android.app.usage.UsageStats; 52 public class RecentAppStatsMixin implements Comparator<UsageStats>, LifecycleObserver, OnStart { 58 final List<UsageStats> mRecentApps; 104 public final int compare(UsageStats a, UsageStats b) { in compare() 118 final List<UsageStats> mStats = mPowerManager.isPowerSaveMode() in loadDisplayableRecentApps() 124 final Map<String, UsageStats> map = new ArrayMap<>(); in loadDisplayableRecentApps() 127 final UsageStats pkgStats = mStats.get(i); in loadDisplayableRecentApps() 132 final UsageStats existingStats = map.get(pkgName); in loadDisplayableRecentApps() 139 final List<UsageStats> packageStats = new ArrayList<>(); in loadDisplayableRecentApps() 143 for (UsageStats stat : packageStats) { in loadDisplayableRecentApps() [all …]
|
D | HibernatedAppsPreferenceController.java | 24 import android.app.usage.UsageStats; 152 final List<UsageStats> usageStatsList = usm.queryUsageStats(INTERVAL_MONTHLY, in getUnusedCount() 154 final Map<String, UsageStats> recentlyUsedPackages = new ArrayMap<>(); in getUnusedCount() 155 for (UsageStats us : usageStatsList) { in getUnusedCount() 162 final UsageStats usageStats = recentlyUsedPackages.get(packageName); in getUnusedCount()
|
D | AppsPreferenceController.java | 20 import android.app.usage.UsageStats; 69 List<UsageStats> mRecentApps; 159 List<UsageStats> loadRecentApps() { in loadRecentApps() 190 for (UsageStats stat : mRecentApps) { 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()
|
/packages/apps/Car/Launcher/src/com/android/car/carlauncher/ |
D | AppGridActivity.java | 23 import android.app.usage.UsageStats; 302 List<UsageStats> stats = in getMostRecentApps() 319 UsageStats usageStats = stats.get(currentIndex); in getMostRecentApps() 373 private static class LastTimeUsedComparator implements Comparator<UsageStats> { 375 public int compare(UsageStats stat1, UsageStats stat2) { in compare()
|
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/data/ |
D | UsageStatsLiveData.kt | 20 import android.app.usage.UsageStats in <lambda>() 40 ) : SmartAsyncMediatorLiveData<Map<UserHandle, List<UsageStats>>>() { in <lambda>() 54 val userMap = mutableMapOf<UserHandle, List<UsageStats>>() in <lambda>()
|
/packages/modules/ExtServices/java/tests/src/android/ext/services/storage/ |
D | CacheQuotaServiceImplTest.java | 24 import android.app.usage.UsageStats; 151 UsageStats stats = new UsageStats.Builder() in makeNewRequest()
|
/packages/apps/Settings/tests/unit/src/com/android/settings/applications/ |
D | HibernatedAppsPreferenceControllerTest.java | 36 import android.app.usage.UsageStats; 175 final UsageStats us = new UsageStats(); in setAutoRevokedPackageUsageStats()
|