Home
last modified time | relevance | path

Searched refs:UsageEvents (Results 1 – 25 of 57) sorted by relevance

123

/frameworks/base/services/people/java/com/android/server/people/data/
DUsageStatsQueryHelper.java21 import android.app.usage.UsageEvents;
45 private final Map<ComponentName, UsageEvents.Event> mConvoStartEvents = new ArrayMap<>();
73 UsageEvents usageEvents = mUsageStatsManagerInternal.queryEventsForUser( in querySince()
74 mUserId, sinceTime, System.currentTimeMillis(), UsageEvents.SHOW_ALL_EVENT_DATA); in querySince()
80 UsageEvents.Event e = new UsageEvents.Event(); in querySince()
91 case UsageEvents.Event.SHORTCUT_INVOCATION: in querySince()
95 case UsageEvents.Event.LOCUS_ID_SET: in querySince()
107 case UsageEvents.Event.ACTIVITY_PAUSED: in querySince()
108 case UsageEvents.Event.ACTIVITY_STOPPED: in querySince()
109 case UsageEvents.Event.ACTIVITY_DESTROYED: in querySince()
[all …]
/frameworks/base/tests/UsageStatsTest/src/com/android/tests/usagestats/
DUsageLogActivity.java19 import android.app.usage.UsageEvents;
65 UsageEvents events = mUsageStatsManager.queryEvents(mLastTime, now); in run()
75 private final CircularArray<UsageEvents.Event> mEvents = new CircularArray<>(MAX_EVENTS);
77 public long update(UsageEvents results) { in update()
80 UsageEvents.Event event = new UsageEvents.Event(); in update()
101 public UsageEvents.Event getItem(int position) { in getItem()
113 if (eventType == UsageEvents.Event.CONFIGURATION_CHANGE) { in getItemViewType()
121 final UsageEvents.Event event = getItem(position); in getView()
127 if (event.getEventType() == UsageEvents.Event.CONFIGURATION_CHANGE) { in getView()
151 event.getEventType() == UsageEvents.Event.CONFIGURATION_CHANGE) { in getView()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/usage/
DUsageStatsServiceTest.java31 import android.app.usage.UsageEvents;
99 UsageEvents.Event event = new UsageEvents.Event(UsageEvents.Event.CONFIGURATION_CHANGE, 10); in testUsageEventListener()
107 usmi.reportEvent("com.android.test", 0, UsageEvents.Event.CHOOSER_ACTION); in testUsageEventListener()
114 UsageEvents.Event mLastReceivedEvent;
116 UsageEvents.Event mExpectedEvent;
121 public void onUsageEvent(int userId, UsageEvents.Event event) { in onUsageEvent()
130 private void setExpectation(int userId, UsageEvents.Event event) { in setExpectation()
DUserUsageStatsServiceTest.java19 import static android.app.usage.UsageEvents.Event.ACTIVITY_RESUMED;
20 import static android.app.usage.UsageEvents.Event.APP_COMPONENT_USED;
26 import android.app.usage.UsageEvents;
27 import android.app.usage.UsageEvents.Event;
93 UsageEvents events = mService.queryEventsForPackage( in testReportEvent_eventAppearsInQueries()
117 UsageEvents events = mService.queryEventsForPackage( in testReportEvent_packageUsedEventNotTracked()
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/
DUsageStatsQueryHelperTest.java35 import android.app.usage.UsageEvents;
199 List<UsageEvents.Event> events = mHelper.queryAppMovingToForegroundEvents(USER_ID_PRIMARY, in testQueryAppMovingToForegroundEvents()
204 assertEquals(UsageEvents.Event.ACTIVITY_RESUMED, events.get(0).getEventType()); in testQueryAppMovingToForegroundEvents()
206 assertEquals(UsageEvents.Event.ACTIVITY_RESUMED, events.get(1).getEventType()); in testQueryAppMovingToForegroundEvents()
262 private void addUsageEvents(UsageEvents.Event... events) { in addUsageEvents()
263 UsageEvents usageEvents = new UsageEvents(Arrays.asList(events), new String[]{}); in addUsageEvents()
294 private static UsageEvents.Event createShortcutInvocationEvent(long timestamp) { in createShortcutInvocationEvent()
295 UsageEvents.Event e = createUsageEvent(UsageEvents.Event.SHORTCUT_INVOCATION, timestamp); in createShortcutInvocationEvent()
300 private static UsageEvents.Event createLocusIdSetEvent(long timestamp, String locusId) { in createLocusIdSetEvent()
301 UsageEvents.Event e = createUsageEvent(UsageEvents.Event.LOCUS_ID_SET, timestamp); in createLocusIdSetEvent()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/
DIntervalStatsTests.java18 import static android.app.usage.UsageEvents.Event.MAX_EVENT_TYPE;
24 import android.app.usage.UsageEvents;
64 UsageEvents.Event event = new UsageEvents.Event(); in populateIntervalStats()
69 event.mFlags |= UsageEvents.Event.FLAG_IS_PACKAGE_INSTANT_APP; in populateIntervalStats()
86 case UsageEvents.Event.CONFIGURATION_CHANGE: in populateIntervalStats()
89 case UsageEvents.Event.SHORTCUT_INVOCATION: in populateIntervalStats()
92 case UsageEvents.Event.STANDBY_BUCKET_CHANGED: in populateIntervalStats()
96 case UsageEvents.Event.NOTIFICATION_INTERRUPTION: in populateIntervalStats()
99 case UsageEvents.Event.LOCUS_ID_SET: in populateIntervalStats()
/frameworks/base/services/usage/java/com/android/server/usage/
DIntervalStats.java18 import static android.app.usage.UsageEvents.Event.ACTIVITY_PAUSED;
19 import static android.app.usage.UsageEvents.Event.ACTIVITY_RESUMED;
20 import static android.app.usage.UsageEvents.Event.ACTIVITY_STOPPED;
21 import static android.app.usage.UsageEvents.Event.CONFIGURATION_CHANGE;
22 import static android.app.usage.UsageEvents.Event.CONTINUE_PREVIOUS_DAY;
23 import static android.app.usage.UsageEvents.Event.CONTINUING_FOREGROUND_SERVICE;
24 import static android.app.usage.UsageEvents.Event.DEVICE_SHUTDOWN;
25 import static android.app.usage.UsageEvents.Event.END_OF_DAY;
26 import static android.app.usage.UsageEvents.Event.FLUSH_TO_DISK;
27 import static android.app.usage.UsageEvents.Event.FOREGROUND_SERVICE_START;
[all …]
DUsageStatsProtoV2.java19 import android.app.usage.UsageEvents;
235 private static UsageEvents.Event parseEvent(ProtoInputStream proto, long beginTime) in parseEvent()
237 final UsageEvents.Event event = new UsageEvents.Event(); in parseEvent()
389 final UsageEvents.Event event) throws IllegalArgumentException { in writeEvent()
406 case UsageEvents.Event.CONFIGURATION_CHANGE: in writeEvent()
411 case UsageEvents.Event.STANDBY_BUCKET_CHANGED: in writeEvent()
416 case UsageEvents.Event.SHORTCUT_INVOCATION: in writeEvent()
421 case UsageEvents.Event.LOCUS_ID_SET: in writeEvent()
426 case UsageEvents.Event.NOTIFICATION_INTERRUPTION: in writeEvent()
498 UsageEvents.Event event = parseEvent(proto, stats.beginTime); in read()
[all …]
DUsageStatsXmlV1.java19 import android.app.usage.UsageEvents;
209 final UsageEvents.Event event = statsOut.buildEvent(packageName, className); in loadEvent()
225 case UsageEvents.Event.CONFIGURATION_CHANGE: in loadEvent()
229 case UsageEvents.Event.SHORTCUT_INVOCATION: in loadEvent()
233 case UsageEvents.Event.STANDBY_BUCKET_CHANGED: in loadEvent()
236 case UsageEvents.Event.NOTIFICATION_INTERRUPTION: in loadEvent()
DUsageStatsService.java19 import static android.app.usage.UsageEvents.Event.CHOOSER_ACTION;
20 import static android.app.usage.UsageEvents.Event.CONFIGURATION_CHANGE;
21 import static android.app.usage.UsageEvents.Event.DEVICE_EVENT_PACKAGE_NAME;
22 import static android.app.usage.UsageEvents.Event.DEVICE_SHUTDOWN;
23 import static android.app.usage.UsageEvents.Event.FLUSH_TO_DISK;
24 import static android.app.usage.UsageEvents.Event.LOCUS_ID_SET;
25 import static android.app.usage.UsageEvents.Event.NOTIFICATION_INTERRUPTION;
26 import static android.app.usage.UsageEvents.Event.SHORTCUT_INVOCATION;
27 import static android.app.usage.UsageEvents.Event.USER_INTERACTION;
28 import static android.app.usage.UsageEvents.Event.USER_STOPPED;
[all …]
DUsageStatsProto.java19 import android.app.usage.UsageEvents;
304 UsageEvents.Event event = statsOut.buildEvent(proto, stringPool); in loadEvent()
424 final UsageEvents.Event event) throws IllegalArgumentException { in writeEvent()
462 case UsageEvents.Event.CONFIGURATION_CHANGE: in writeEvent()
467 case UsageEvents.Event.SHORTCUT_INVOCATION: in writeEvent()
472 case UsageEvents.Event.STANDBY_BUCKET_CHANGED: in writeEvent()
477 case UsageEvents.Event.NOTIFICATION_INTERRUPTION: in writeEvent()
491 case UsageEvents.Event.LOCUS_ID_SET: in writeEvent()
DUserUsageStatsService.java19 import static android.app.usage.UsageEvents.Event.DEVICE_SHUTDOWN;
20 import static android.app.usage.UsageEvents.Event.DEVICE_STARTUP;
21 import static android.app.usage.UsageEvents.HIDE_LOCUS_EVENTS;
22 import static android.app.usage.UsageEvents.HIDE_SHORTCUT_EVENTS;
23 import static android.app.usage.UsageEvents.OBFUSCATE_INSTANT_APPS;
24 import static android.app.usage.UsageEvents.OBFUSCATE_NOTIFICATION_EVENTS;
36 import android.app.usage.UsageEvents;
37 import android.app.usage.UsageEvents.Event;
505 UsageEvents queryEvents(final long beginTime, final long endTime, int flags) { in queryEvents()
564 return new UsageEvents(results, table, true); in queryEvents()
[all …]
/frameworks/base/core/java/android/app/usage/
DEventList.java29 private final ArrayList<UsageEvents.Event> mEvents;
58 public UsageEvents.Event get(int index) { in get()
68 public void insert(UsageEvents.Event event) { in insert()
87 public UsageEvents.Event remove(int index) { in remove()
DIUsageStatsManager.aidl20 import android.app.usage.UsageEvents;
39 UsageEvents queryEvents(long beginTime, long endTime, String callingPackage); in queryEvents()
40 UsageEvents queryEventsForPackage(long beginTime, long endTime, String callingPackage); in queryEventsForPackage()
41 UsageEvents queryEventsForUser(long beginTime, long endTime, int userId, String callingPackage); in queryEventsForUser()
42UsageEvents queryEventsForPackageForUser(long beginTime, long endTime, int userId, String pkg, Str… in queryEventsForPackageForUser()
DUsageStats.java19 import static android.app.usage.UsageEvents.Event.ACTIVITY_DESTROYED;
20 import static android.app.usage.UsageEvents.Event.ACTIVITY_PAUSED;
21 import static android.app.usage.UsageEvents.Event.ACTIVITY_RESUMED;
22 import static android.app.usage.UsageEvents.Event.ACTIVITY_STOPPED;
23 import static android.app.usage.UsageEvents.Event.APP_COMPONENT_USED;
24 import static android.app.usage.UsageEvents.Event.CONTINUING_FOREGROUND_SERVICE;
25 import static android.app.usage.UsageEvents.Event.DEVICE_SHUTDOWN;
26 import static android.app.usage.UsageEvents.Event.END_OF_DAY;
27 import static android.app.usage.UsageEvents.Event.FLUSH_TO_DISK;
28 import static android.app.usage.UsageEvents.Event.FOREGROUND_SERVICE_START;
[all …]
DUsageEvents.java36 public final class UsageEvents implements Parcelable { class
746 public UsageEvents(Parcel in) { in UsageEvents() method in UsageEvents
771 UsageEvents() { in UsageEvents() method in UsageEvents
781 public UsageEvents(List<Event> events, String[] stringPool) { in UsageEvents() method in UsageEvents
789 public UsageEvents(List<Event> events, String[] stringPool, boolean includeTaskRoots) { in UsageEvents() method in UsageEvents
1048 …lic static final @android.annotation.NonNull Creator<UsageEvents> CREATOR = new Creator<UsageEvent…
1050 public UsageEvents createFromParcel(Parcel source) {
1051 return new UsageEvents(source);
1055 public UsageEvents[] newArray(int size) {
1056 return new UsageEvents[size];
DUsageEvents.aidl19 parcelable UsageEvents;
DUsageStatsManager.java397 private static final UsageEvents sEmptyResults = new UsageEvents();
549 public UsageEvents queryEvents(long beginTime, long endTime) { in queryEvents()
551 UsageEvents iter = mService.queryEvents(beginTime, endTime, in queryEvents()
577 public UsageEvents queryEventsForSelf(long beginTime, long endTime) { in queryEventsForSelf()
579 final UsageEvents events = mService.queryEventsForPackage(beginTime, endTime, in queryEventsForSelf()
/frameworks/base/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/
DUsageStatsDatabasePerfTest.java21 import android.app.usage.UsageEvents;
62 private static final StatCombiner<UsageEvents.Event> sUsageStatsCombiner =
63 new StatCombiner<UsageEvents.Event>() {
66 List<UsageEvents.Event> accResult) {
90 UsageEvents.Event event = new UsageEvents.Event(); in populateIntervalStats()
94 event.mEventType = UsageEvents.Event.ACTIVITY_RESUMED; in populateIntervalStats()
123 List<UsageEvents.Event> temp = sUsageStatsDatabase.queryUsageStats( in runQueryUsageStatsTest()
/frameworks/base/core/tests/coretests/src/android/app/usage/
DUsageStatsTest.java19 import static android.app.usage.UsageEvents.Event.ACTIVITY_DESTROYED;
20 import static android.app.usage.UsageEvents.Event.ACTIVITY_PAUSED;
21 import static android.app.usage.UsageEvents.Event.ACTIVITY_RESUMED;
22 import static android.app.usage.UsageEvents.Event.ACTIVITY_STOPPED;
23 import static android.app.usage.UsageEvents.Event.APP_COMPONENT_USED;
24 import static android.app.usage.UsageEvents.Event.CONTINUING_FOREGROUND_SERVICE;
25 import static android.app.usage.UsageEvents.Event.DEVICE_SHUTDOWN;
26 import static android.app.usage.UsageEvents.Event.END_OF_DAY;
27 import static android.app.usage.UsageEvents.Event.FLUSH_TO_DISK;
28 import static android.app.usage.UsageEvents.Event.FOREGROUND_SERVICE_START;
[all …]
DUsageStatsPersistenceTest.java94 final UsageEvents.Event event = new UsageEvents.Event(); in testUsageEventsFields()
DEventListTest.java38 private UsageEvents.Event getUsageEvent(long timeStamp) { in getUsageEvent()
39 final UsageEvents.Event event = new UsageEvents.Event(); in getUsageEvent()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/usage/
DAppStandbyController.java62 import android.app.usage.UsageEvents;
938 public void onUsageEvent(int userId, @NonNull UsageEvents.Event event) { in onUsageEvent()
941 if ((eventType == UsageEvents.Event.ACTIVITY_RESUMED in onUsageEvent()
942 || eventType == UsageEvents.Event.ACTIVITY_PAUSED in onUsageEvent()
943 || eventType == UsageEvents.Event.SYSTEM_INTERACTION in onUsageEvent()
944 || eventType == UsageEvents.Event.USER_INTERACTION in onUsageEvent()
945 || eventType == UsageEvents.Event.NOTIFICATION_SEEN in onUsageEvent()
946 || eventType == UsageEvents.Event.SLICE_PINNED in onUsageEvent()
947 || eventType == UsageEvents.Event.SLICE_PINNED_PRIV in onUsageEvent()
948 || eventType == UsageEvents.Event.FOREGROUND_SERVICE_START)) { in onUsageEvent()
[all …]
/frameworks/base/services/core/java/android/app/usage/
DUsageStatsManagerInternal.java222 public abstract UsageEvents queryEventsForUser(@UserIdInt int userId, long beginTime, in queryEventsForUser()
335 void onUsageEvent(@UserIdInt int userId, @NonNull UsageEvents.Event event); in onUsageEvent()
/frameworks/base/services/tests/servicestests/src/com/android/server/apphibernation/
DAppHibernationServiceTest.java19 import static android.app.usage.UsageEvents.Event.ACTIVITY_RESUMED;
20 import static android.app.usage.UsageEvents.Event.APP_COMPONENT_USED;
21 import static android.app.usage.UsageEvents.Event.USER_INTERACTION;
40 import android.app.usage.UsageEvents.Event;

123