/developers/build/prebuilts/gradle/AppUsageStatistics/Application/src/main/java/com/example/android/appusagestatistics/ |
CustomUsageStats.java | 19 import android.app.usage.UsageStats; 26 public UsageStats usageStats;
|
AppUsageStatisticsFragment.java | 19 import android.app.usage.UsageStats; 80 .getSystemService("usagestats"); //Context.USAGE_STATS_SERVICE 112 List<UsageStats> usageStatsList = 134 * @return A list of {@link android.app.usage.UsageStats}. 136 public List<UsageStats> getUsageStatistics(int intervalType) { 141 List<UsageStats> queryUsageStats = mUsageStatsManager 162 * Updates the {@link #mRecyclerView} with the list of {@link UsageStats} passed as an argument. 164 * @param usageStatsList A list of {@link UsageStats} from which update the 168 void updateAppsList(List<UsageStats> usageStatsList) { 172 customUsageStats.usageStats = usageStatsList.get(i) [all...] |
/developers/samples/android/system/AppUsageStatistics/Application/src/main/java/com/example/android/appusagestatistics/ |
CustomUsageStats.java | 19 import android.app.usage.UsageStats; 26 public UsageStats usageStats;
|
AppUsageStatisticsFragment.java | 19 import android.app.usage.UsageStats; 80 .getSystemService("usagestats"); //Context.USAGE_STATS_SERVICE 112 List<UsageStats> usageStatsList = 134 * @return A list of {@link android.app.usage.UsageStats}. 136 public List<UsageStats> getUsageStatistics(int intervalType) { 141 List<UsageStats> queryUsageStats = mUsageStatsManager 162 * Updates the {@link #mRecyclerView} with the list of {@link UsageStats} passed as an argument. 164 * @param usageStatsList A list of {@link UsageStats} from which update the 168 void updateAppsList(List<UsageStats> usageStatsList) { 172 customUsageStats.usageStats = usageStatsList.get(i) [all...] |
/development/samples/browseable/AppUsageStatistics/src/com.example.android.appusagestatistics/ |
CustomUsageStats.java | 19 import android.app.usage.UsageStats; 26 public UsageStats usageStats;
|
AppUsageStatisticsFragment.java | 19 import android.app.usage.UsageStats; 80 .getSystemService("usagestats"); //Context.USAGE_STATS_SERVICE 112 List<UsageStats> usageStatsList = 134 * @return A list of {@link android.app.usage.UsageStats}. 136 public List<UsageStats> getUsageStatistics(int intervalType) { 141 List<UsageStats> queryUsageStats = mUsageStatsManager 162 * Updates the {@link #mRecyclerView} with the list of {@link UsageStats} passed as an argument. 164 * @param usageStatsList A list of {@link UsageStats} from which update the 168 void updateAppsList(List<UsageStats> usageStatsList) { 172 customUsageStats.usageStats = usageStatsList.get(i) [all...] |
/frameworks/base/core/java/android/app/usage/ |
UsageStats.java | 26 public final class UsageStats implements Parcelable { 67 public UsageStats() { 70 public UsageStats(UsageStats stats) { 85 * Get the beginning of the time range this {@link android.app.usage.UsageStats} represents, 95 * Get the end of the time range this {@link android.app.usage.UsageStats} represents, 121 * Add the statistics from the right {@link UsageStats} to the left. The package name for 122 * both {@link UsageStats} objects must be the same. 123 * @param right The {@link UsageStats} object to merge into this one. 125 * {@link UsageStats} objects are different [all...] |
UsageStatsManager.java | 104 * <p>The returned list will contain a {@link UsageStats} object for each package that 122 * @return A list of {@link UsageStats} or null if none are available. 130 public List<UsageStats> queryUsageStats(int intervalType, long beginTime, long endTime) { 133 ParceledListSlice<UsageStats> slice = mService.queryUsageStats(intervalType, beginTime, 203 public Map<String, UsageStats> queryAndAggregateUsageStats(long beginTime, long endTime) { 204 List<UsageStats> stats = queryUsageStats(INTERVAL_BEST, beginTime, endTime); 209 ArrayMap<String, UsageStats> aggregatedStats = new ArrayMap<>(); 212 UsageStats newStat = stats.get(i); 213 UsageStats existingStat = aggregatedStats.get(newStat.getPackageName());
|
/packages/apps/Settings/src/com/android/settings/ |
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) { 74 public static class LastTimeUsedComparator implements Comparator<UsageStats> { 76 public final int compare(UsageStats a, UsageStats b) { 82 public static class UsageTimeComparator implements Comparator<UsageStats> { 84 public final int compare(UsageStats a, UsageStats b) [all...] |
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
MetadataEntryParserTest.java | 26 import com.android.providers.contacts.MetadataEntryParser.UsageStats; 95 UsageStats usageStats1_1 = new UsageStats(usageType1_1, lastTimeUsed1_1, timesUsed1_1); 96 UsageStats usageStats1_2 = new UsageStats(usageType1_2, lastTimeUsed1_2, timesUsed1_2); 97 UsageStats usageStats2 = new UsageStats(usageType2, lastTimeUsed2, timesUsed2); 99 ArrayList<UsageStats> usageStats1List = new ArrayList<>(); 104 ArrayList<UsageStats> usageStats2List = new ArrayList<>(); 292 private void assertUsageStatsListEquals(ArrayList<UsageStats> usageStatsList1 [all...] |
ContactsProvider2Test.java | 91 import com.android.providers.contacts.MetadataEntryParser.UsageStats; [all...] |
/frameworks/base/tests/UsageStatsTest/src/com/android/tests/usagestats/ |
UsageStatsActivity.java | 17 package com.android.tests.usagestats; 20 import android.app.usage.UsageStats; 44 private Comparator<UsageStats> mComparator = new Comparator<UsageStats>() { 46 public int compare(UsageStats o1, UsageStats o2) { 87 Map<String, UsageStats> stats = mUsageStatsManager.queryAndAggregateUsageStats( 93 private ArrayList<UsageStats> mStats = new ArrayList<>(); 95 public void update(Map<String, UsageStats> stats) {
|
/developers/build/prebuilts/gradle/AppUsageStatistics/Application/tests/src/com/example/android/appusagestatistics/ |
AppUsageStatisticsFragmentTests.java | 21 import android.app.usage.UsageStats; 76 List<UsageStats> usageStatsList = mTestFragment 79 // Whether the usageStatsList has any UsageStats depends on if the app is granted 87 List<UsageStats> usageStatsList = mTestFragment
|
/developers/samples/android/system/AppUsageStatistics/Application/tests/src/com/example/android/appusagestatistics/ |
AppUsageStatisticsFragmentTests.java | 21 import android.app.usage.UsageStats; 76 List<UsageStats> usageStatsList = mTestFragment 79 // Whether the usageStatsList has any UsageStats depends on if the app is granted 87 List<UsageStats> usageStatsList = mTestFragment
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
IntervalStats.java | 21 import android.app.usage.UsageStats; 30 public final ArrayMap<String, UsageStats> packageStats = new ArrayMap<>(); 42 * Gets the UsageStats object for the given package, or creates one and adds it internally. 44 UsageStats getOrCreateUsageStats(String packageName) { 45 UsageStats usageStats = packageStats.get(packageName); 46 if (usageStats == null) { 47 usageStats = new UsageStats(); 48 usageStats.mPackageName = getCachedStringRef(packageName) [all...] |
UserUsageStatsService.java | 23 import android.app.usage.UsageStats; 130 UsageStats pkgStats = stat.packageStats.valueAt(i); 194 private static final StatCombiner<UsageStats> sUsageStatsCombiner = 195 new StatCombiner<UsageStats>() { 198 List<UsageStats> accResult) { 206 accResult.add(new UsageStats(stats.packageStats.valueAt(i))); 299 List<UsageStats> queryUsageStats(int bucketType, long beginTime, long endTime) { 374 UsageStats pkgStats = stat.packageStats.valueAt(i); 511 final ArrayMap<String, UsageStats> pkgStats = stats.packageStats; 514 final UsageStats usageStats = pkgStats.valueAt(i) [all...] |
UsageStatsXmlV1.java | 27 import android.app.usage.UsageStats; 34 * UsageStats reader/writer for version 1 of the XML format. 68 final UsageStats stats = statsOut.getOrCreateUsageStats(pkg); 128 final UsageStats usageStats) throws IOException { 133 usageStats.mLastTimeUsed - stats.beginTime); 135 XmlUtils.writeStringAttribute(xml, PACKAGE_ATTR, usageStats.mPackageName); 136 XmlUtils.writeLongAttribute(xml, TOTAL_TIME_ACTIVE_ATTR, usageStats.mTotalTimeInForeground); 137 XmlUtils.writeIntAttribute(xml, LAST_EVENT_ATTR, usageStats.mLastEvent); 193 * <code><usagestats></code> tag [all...] |
UsageStatsService.java | 28 import android.app.usage.UsageStats; 170 mUsageStatsDir = new File(systemDataDir, "usagestats"); 591 Slog.i(TAG, "Time changed in UsageStats by " + (diffSystemTime / 1000) + " seconds"); 725 List<UsageStats> queryUsageStats(int userId, int bucketType, long beginTime, long endTime) { [all...] |
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
AppStateUsageStatsBridge.java | 18 import android.app.usage.UsageStats; 65 final Map<String, UsageStats> map = mUsageStatsManager.queryAndAggregateUsageStats(0, 68 UsageStats usageStats = map.get(entry.info.packageName); 69 entry.extraInfo = new UsageStatsState(getDaysSinceLastUse(usageStats), 77 Map<String, UsageStats> map = mUsageStatsManager.queryAndAggregateUsageStats(0, 79 UsageStats usageStats = map.get(app.info.packageName); 80 app.extraInfo = new UsageStatsState(getDaysSinceLastUse(usageStats), 85 private long getDaysSinceLastUse(UsageStats stats) [all...] |
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
MetadataEntryParser.java | 62 public static class UsageStats { 68 public UsageStats(String usageType, long lastTimeUsed, int timesUsed) { 80 final ArrayList<UsageStats> mUsageStatsList; 84 ArrayList<UsageStats> usageStatsList) { 210 final ArrayList<UsageStats> usageStatsList = new ArrayList<UsageStats>(); 212 final JSONArray usageStats = fieldData.getJSONArray(USAGE_STATS); 213 for (int j = 0; j < usageStats.length(); j++) { 214 final JSONObject usageStat = usageStats.getJSONObject(j); 222 final UsageStats usageStatsParsed = new UsageStats [all...] |
ContactsProvider2.java | 156 import com.android.providers.contacts.MetadataEntryParser.UsageStats; [all...] |
/cts/tests/tests/app.usage/src/android/app/usage/cts/ |
UsageStatsTest.java | 23 import android.app.usage.UsageStats; 45 * Test the UsageStats API. It is difficult to test the entire surface area 201 Map<String, UsageStats> statsMap = mUsageStatsManager.queryAndAggregateUsageStats(startTime, endTime); 204 final UsageStats before = statsMap.get(mTargetPackage); 213 final UsageStats after = statsMap.get(mTargetPackage); 232 // Ensure some data is in the UsageStats log. 287 final List<UsageStats> statsList = mUsageStatsManager.queryUsageStats(intervalType, startTime, endTime); 291 for (UsageStats stats : statsList) { 311 List<UsageStats> stats = mUsageStatsManager.queryUsageStats(UsageStatsManager.INTERVAL_BEST,
|
/frameworks/base/core/java/com/android/internal/app/ |
ResolverComparator.java | 20 import android.app.usage.UsageStats; 61 private final Map<String, UsageStats> mStats; 94 final UsageStats pkStats = mStats.get(target.name.getPackageName());
|
/frameworks/base/ |
compiled-classes-phone | 608 android.app.usage.UsageStats 609 android.app.usage.UsageStats$1 [all...] |
/prebuilts/sdk/21/ |
android.jar | |