Home
last modified time | relevance | path

Searched refs:UsageStats (Results 1 – 25 of 33) sorted by relevance

12

/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsProto.java20 import android.app.usage.UsageStats;
68 UsageStats stats; in loadUsageStats()
69 if (proto.nextField(IntervalStatsProto.UsageStats.PACKAGE_INDEX)) { in loadUsageStats()
73 stringPool.get(proto.readInt(IntervalStatsProto.UsageStats.PACKAGE_INDEX) - 1)); in loadUsageStats()
74 } else if (proto.nextField(IntervalStatsProto.UsageStats.PACKAGE)) { in loadUsageStats()
77 proto.readString(IntervalStatsProto.UsageStats.PACKAGE)); in loadUsageStats()
80 stats = new UsageStats(); in loadUsageStats()
85 case (int) IntervalStatsProto.UsageStats.PACKAGE: in loadUsageStats()
87 UsageStats tempPackage = statsOut.getOrCreateUsageStats( in loadUsageStats()
88 proto.readString(IntervalStatsProto.UsageStats.PACKAGE)); in loadUsageStats()
[all …]
DIntervalStats.java44 import android.app.usage.UsageStats;
73 public final ArrayMap<String, UsageStats> packageStats = new ArrayMap<>();
75 public final SparseArray<UsageStats> packageStatsObfuscated = new SparseArray<>();
130 UsageStats getOrCreateUsageStats(String packageName) { in getOrCreateUsageStats()
131 UsageStats usageStats = packageStats.get(packageName); in getOrCreateUsageStats()
133 usageStats = new UsageStats(); in getOrCreateUsageStats()
315 UsageStats usageStats = packageStats.valueAt(i); in update()
319 UsageStats usageStats = getOrCreateUsageStats(packageName); in update()
353 UsageStats usageStats = getOrCreateUsageStats(packageName); in updateChooserCounts()
388 UsageStats usageStats = getOrCreateUsageStats(packageName); in incrementAppLaunchCount()
[all …]
DUsageStatsProtoV2.java20 import android.app.usage.UsageStats;
46 private static UsageStats parseUsageStats(ProtoInputStream proto, final long beginTime) in parseUsageStats()
48 UsageStats stats = new UsageStats(); in parseUsageStats()
123 private static void loadChooserCounts(ProtoInputStream proto, UsageStats usageStats) in loadChooserCounts()
303 final UsageStats stats) throws IllegalArgumentException { in writeUsageStats()
331 private static void writeChooserCounts(ProtoOutputStream proto, final UsageStats stats) in writeChooserCounts()
467 UsageStats usageStats = parseUsageStats(proto, stats.beginTime); in read()
503 final UsageStats usageStats = stats.packageStatsObfuscated.valueAt(i); in read()
DUserUsageStatsService.java38 import android.app.usage.UsageStats;
360 private static final StatCombiner<UsageStats> sUsageStatsCombiner =
361 new StatCombiner<UsageStats>() {
364 List<UsageStats> accResult) {
372 accResult.add(new UsageStats(stats.packageStats.valueAt(i)));
479 List<UsageStats> queryUsageStats(int bucketType, long beginTime, long endTime) { in queryUsageStats()
637 final UsageStats pkgStats = stat.packageStats.valueAt(i); in rolloverStats()
989 final ArrayMap<String, UsageStats> pkgStats = stats.packageStats; in printIntervalStats()
992 final UsageStats usageStats = pkgStats.valueAt(i); in printIntervalStats()
1016 for (UsageStats usageStats : pkgStats.values()) { in printIntervalStats()
DUsageStatsXmlV1.java20 import android.app.usage.UsageStats;
90 final UsageStats stats = statsOut.getOrCreateUsageStats(pkg); in loadUsageStats()
153 XmlPullParser parser, UsageStats usageStats, String action) in loadChooserCounts()
DUsageStatsService.java48 import android.app.usage.UsageStats;
1036 List<UsageStats> queryUsageStats(int userId, int bucketType, long beginTime, long endTime, in queryUsageStats()
1048 List<UsageStats> list = service.queryUsageStats(bucketType, beginTime, endTime); in queryUsageStats()
1057 final UsageStats stats = list.get(i); in queryUsageStats()
1472 public ParceledListSlice<UsageStats> queryUsageStats(int bucketType, long beginTime, in queryUsageStats()
1484 final List<UsageStats> results = UsageStatsService.this.queryUsageStats( in queryUsageStats()
2241 public List<UsageStats> queryUsageStatsForUser( in queryUsageStatsForUser()
DUsageStatsDatabase.java21 import android.app.usage.UsageStats;
656 final UsageStats usageStats = stats.packageStats.valueAt(i); in pruneStats()
768 final UsageStats usageStats = stats.packageStats.get(removedPackage); in filterStats()
973 UsageStats pkgStats = stats.packageStats.valueAt(i); in pruneChooserCountsOlderThan()
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DResolverListControllerTest.java31 import android.app.usage.UsageStats;
98 UsageStats packageStats = initStats(packageName, action, annotation, initialCount); in reportChooserSelection()
99 UsageStats oneClickStats = initStats(packageName, action, annotation, 1); in reportChooserSelection()
100 final List<UsageStats> slices = new ArrayList<>(); in reportChooserSelection()
102 ParceledListSlice<UsageStats> stats = new ParceledListSlice<>(slices); in reportChooserSelection()
154 private UsageStats initStats(String packageName, String action, in initStats()
160 UsageStats packageStats = new UsageStats(); in initStats()
182 Map<String, UsageStats> stats = in getCount()
184 UsageStats packageStats = stats.get(packageName); in getCount()
/frameworks/base/core/java/android/app/usage/
DUsageStats.java46 public final class UsageStats implements Parcelable { class
158 public UsageStats() { in UsageStats() method in UsageStats
161 public UsageStats(UsageStats stats) { in UsageStats() method in UsageStats
182 public UsageStats getObfuscatedForInstantApp() { in getObfuscatedForInstantApp()
183 final UsageStats ret = new UsageStats(this); in getObfuscatedForInstantApp()
306 public void add(UsageStats right) { in add()
663 …blic static final @android.annotation.NonNull Creator<UsageStats> CREATOR = new Creator<UsageStats
665 public UsageStats createFromParcel(Parcel in) {
666 UsageStats stats = new UsageStats();
722 public UsageStats[] newArray(int size) {
[all …]
DCacheQuotaHint.java40 private final UsageStats mUsageStats;
66 public UsageStats getUsageStats() { in getUsageStats()
103 private UsageStats mUsageStats;
127 public @NonNull Builder setUsageStats(@Nullable UsageStats stats) { in setUsageStats()
151 .setUsageStats(in.readParcelable(UsageStats.class.getClassLoader()))
DUsageStatsManager.java440 public List<UsageStats> queryUsageStats(int intervalType, long beginTime, long endTime) { in queryUsageStats()
443 ParceledListSlice<UsageStats> slice = mService.queryUsageStats(intervalType, beginTime, in queryUsageStats()
601 public Map<String, UsageStats> queryAndAggregateUsageStats(long beginTime, long endTime) { in queryAndAggregateUsageStats()
602 List<UsageStats> stats = queryUsageStats(INTERVAL_BEST, beginTime, endTime); in queryAndAggregateUsageStats()
607 ArrayMap<String, UsageStats> aggregatedStats = new ArrayMap<>(); in queryAndAggregateUsageStats()
610 UsageStats newStat = stats.get(i); in queryAndAggregateUsageStats()
611 UsageStats existingStat = aggregatedStats.get(newStat.getPackageName()); in queryAndAggregateUsageStats()
/frameworks/base/tests/UsageStatsTest/src/com/android/tests/usagestats/
DUsageStatsActivity.java22 import android.app.usage.UsageStats;
58 private Comparator<UsageStats> mComparator = new Comparator<UsageStats>() {
60 public int compare(UsageStats o1, UsageStats o2) {
226 Map<String, UsageStats> stats = mUsageStatsManager.queryAndAggregateUsageStats( in updateAdapter()
232 private ArrayList<UsageStats> mStats = new ArrayList<>();
234 public void update(Map<String, UsageStats> stats) { in update()
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DUsageStatsQueryHelperTest.java35 import android.app.usage.UsageStats;
203 UsageStats packageStats1 = createUsageStats(PKG_NAME_1, 2, createDummyChooserCounts()); in testQueryAppUsageStats()
204 UsageStats packageStats2 = createUsageStats(PKG_NAME_1, 3, null); in testQueryAppUsageStats()
205 UsageStats packageStats3 = createUsageStats(PKG_NAME_2, 1, createDummyChooserCounts()); in testQueryAppUsageStats()
223 UsageStats packageStats1 = createUsageStats(PKG_NAME_1, 2, createDummyChooserCounts()); in testQueryAppUsageStats_packageNameFiltered()
224 UsageStats packageStats2 = createUsageStats(PKG_NAME_1, 3, createDummyChooserCounts()); in testQueryAppUsageStats_packageNameFiltered()
225 UsageStats packageStats3 = createUsageStats(PKG_NAME_2, 1, null); in testQueryAppUsageStats_packageNameFiltered()
259 private static UsageStats createUsageStats(String packageName, int launchCount, in createUsageStats()
261 UsageStats packageStats = new UsageStats(); in createUsageStats()
/frameworks/base/core/tests/coretests/src/android/app/usage/
DUsageStatsPersistenceTest.java56 final UsageStats stats = new UsageStats(); in testUsageStatsFields()
DUsageStatsTest.java51 private UsageStats left;
52 private UsageStats right;
56 left = new UsageStats(); in setUp()
57 right = new UsageStats(); in setUp()
149 right = UsageStats.CREATOR.createFromParcel(p); in testParcelable()
584 void compareUsageStats(UsageStats us1, UsageStats us2) {
/frameworks/base/core/proto/android/server/
Dusagestatsservice.proto35 // Stores the relevant information from a UsageStats
36 message UsageStats { message
103 // stringpool contains all the package and class names used by UsageStats and Event
116 repeated UsageStats packages = 20;
Dusagestatsservice_v2.proto63 * Stores the relevant information from an obfuscated UsageStats.
/frameworks/base/services/people/java/com/android/server/people/data/
DUsageStatsQueryHelper.java22 import android.app.usage.UsageStats;
147 List<UsageStats> stats = getUsageStatsManagerInternal().queryUsageStatsForUser(userId, in queryAppUsageStats()
154 for (UsageStats stat : stats) { in queryAppUsageStats()
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/
DUsageStatsDatabaseTest.java28 import android.app.usage.UsageStats;
258 void compareUsageStats(UsageStats us1, UsageStats us2) { in compareUsageStats()
345 UsageStats usageStats1 = stats1.packageStats.get(usageKey1[i]); in compareIntervalStats()
346 UsageStats usageStats2 = stats2.packageStats.get(usageKey2[i]); in compareIntervalStats()
/frameworks/base/services/core/java/com/android/server/storage/
DCacheQuotaStrategy.java23 import android.app.usage.UsageStats;
178 List<UsageStats> stats = in getUnfulfilledRequests()
185 for (UsageStats stat : stats) { in getUnfulfilledRequests()
/frameworks/base/core/java/com/android/internal/app/
DResolverRankerServiceResolverComparator.java20 import android.app.usage.UsageStats;
72 private final Map<String, UsageStats> mStats;
145 final UsageStats pkStats = mStats.get(target.name.getPackageName()); in doCompute()
/frameworks/base/services/core/java/android/app/usage/
DUsageStatsManagerInternal.java213 public abstract List<UsageStats> queryUsageStatsForUser(@UserIdInt int userId, int interval, in queryUsageStatsForUser()
/frameworks/base/services/core/java/com/android/server/biometrics/face/
DFaceService.java147 private class UsageStats { class in FaceService
161 UsageStats(Context context) { in UsageStats() method in FaceService.UsageStats
845 private UsageStats mUsageStats;
1062 mUsageStats = new UsageStats(context); in FaceService()
/frameworks/base/config/
Dboot-profile.txt549 Landroid/app/usage/UsageStats;-><init>()V
1002 Landroid/app/usage/UsageStats;->update(Ljava/lang/String;JII)V
/frameworks/base/services/
Dart-profile-boot273 …erver/usage/IntervalStats;->getOrCreateUsageStats(Ljava/lang/String;)Landroid/app/usage/UsageStats;

12