/frameworks/base/services/people/java/com/android/server/people/data/ |
D | UsageStatsQueryHelper.java | 21 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/ |
D | UsageLogActivity.java | 19 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/ |
D | UsageStatsServiceTest.java | 31 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()
|
D | UserUsageStatsServiceTest.java | 19 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.NOTIFICATION_SEEN; 29 import android.app.usage.UsageEvents; 30 import android.app.usage.UsageEvents.Event; 110 UsageEvents events = mService.queryEventsForPackage( in testReportEvent_eventAppearsInQueries() 137 UsageEvents events = mService.queryEventsForPackage( in testReportEvent_packageUsedEventNotTracked() 165 UsageEvents events = mService.queryEarliestEventsForPackage( in testQueryEarliestEventsForPackage() 202 UsageEvents events = mService.queryEarliestEventsForPackage( in testQueryEarliestEventsForPackage_Caching()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/ |
D | IntervalStatsTests.java | 18 import static android.app.usage.UsageEvents.Event.MAX_EVENT_TYPE; 25 import android.app.usage.UsageEvents; 67 UsageEvents.Event event = new UsageEvents.Event(); in populateIntervalStats() 72 event.mFlags |= UsageEvents.Event.FLAG_IS_PACKAGE_INSTANT_APP; in populateIntervalStats() 89 case UsageEvents.Event.CONFIGURATION_CHANGE: in populateIntervalStats() 92 case UsageEvents.Event.SHORTCUT_INVOCATION: in populateIntervalStats() 95 case UsageEvents.Event.STANDBY_BUCKET_CHANGED: in populateIntervalStats() 99 case UsageEvents.Event.NOTIFICATION_INTERRUPTION: in populateIntervalStats() 102 case UsageEvents.Event.LOCUS_ID_SET: in populateIntervalStats() 105 case UsageEvents.Event.USER_INTERACTION: in populateIntervalStats()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/people/data/ |
D | UsageStatsQueryHelperTest.java | 35 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/core/java/android/app/usage/ |
D | EventList.java | 29 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()
|
D | IUsageStatsManager.aidl | 22 import android.app.usage.UsageEvents; 41 UsageEvents queryEvents(long beginTime, long endTime, String callingPackage); in queryEvents() 42 UsageEvents queryEventsForPackage(long beginTime, long endTime, String callingPackage); in queryEventsForPackage() 43 UsageEvents queryEventsForUser(long beginTime, long endTime, int userId, String callingPackage); in queryEventsForUser() 44 …UsageEvents queryEventsForPackageForUser(long beginTime, long endTime, int userId, String pkg, Str… in queryEventsForPackageForUser() 46 UsageEvents queryEventsWithFilter(in UsageEventsQuery query, String callingPackage); in queryEventsWithFilter()
|
D | UsageStats.java | 19 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 …]
|
D | UsageEvents.java | 42 public final class UsageEvents implements Parcelable { class 816 public UsageEvents(Parcel in) { in UsageEvents() method in UsageEvents 868 UsageEvents() { in UsageEvents() method in UsageEvents 878 public UsageEvents(List<Event> events, String[] stringPool) { in UsageEvents() method in UsageEvents 886 public UsageEvents(List<Event> events, String[] stringPool, boolean includeTaskRoots) { in UsageEvents() method in UsageEvents 1187 …lic static final @android.annotation.NonNull Creator<UsageEvents> CREATOR = new Creator<UsageEvent… 1189 public UsageEvents createFromParcel(Parcel source) { 1190 return new UsageEvents(source); 1194 public UsageEvents[] newArray(int size) { 1195 return new UsageEvents[size];
|
D | UsageEvents.aidl | 19 parcelable UsageEvents;
|
D | UsageStatsManager.java | 438 private static final UsageEvents sEmptyResults = new UsageEvents(); 590 public UsageEvents queryEvents(long beginTime, long endTime) { in queryEvents() 592 UsageEvents iter = mService.queryEvents(beginTime, endTime, in queryEvents() 615 public UsageEvents queryEvents(@NonNull UsageEventsQuery query) { in queryEvents() 617 UsageEvents iter = mService.queryEventsWithFilter(query, mContext.getOpPackageName()); in queryEvents() 642 public UsageEvents queryEventsForSelf(long beginTime, long endTime) { in queryEventsForSelf() 644 final UsageEvents events = mService.queryEventsForPackage(beginTime, endTime, in queryEventsForSelf()
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | IntervalStats.java | 18 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 …]
|
D | UsageStatsProtoV2.java | 19 import android.app.usage.UsageEvents; 20 import android.app.usage.UsageEvents.Event.UserInteractionEventExtrasToken; 239 private static UsageEvents.Event parseEvent(ProtoInputStream proto, long beginTime) in parseEvent() 241 final UsageEvents.Event event = new UsageEvents.Event(); in parseEvent() 403 final UsageEvents.Event event) throws IOException, IllegalArgumentException { in writeEvent() 420 case UsageEvents.Event.CONFIGURATION_CHANGE: in writeEvent() 425 case UsageEvents.Event.STANDBY_BUCKET_CHANGED: in writeEvent() 430 case UsageEvents.Event.SHORTCUT_INVOCATION: in writeEvent() 435 case UsageEvents.Event.LOCUS_ID_SET: in writeEvent() 440 case UsageEvents.Event.NOTIFICATION_INTERRUPTION: in writeEvent() [all …]
|
D | UsageStatsXmlV1.java | 19 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()
|
D | UserUsageStatsService.java | 19 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; 37 import android.app.usage.UsageEvents; 38 import android.app.usage.UsageEvents.Event; 115 public List<UsageEvents.Event> events; 538 UsageEvents queryEvents(final long beginTime, final long endTime, int flags, in queryEvents() [all …]
|
D | UsageStatsService.java | 19 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 …]
|
D | UsageStatsProto.java | 19 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()
|
/frameworks/base/tests/UsageStatsPerfTests/src/com/android/frameworks/perftests/usage/tests/ |
D | UsageStatsDatabasePerfTest.java | 21 import android.app.usage.UsageEvents; 62 private static final StatCombiner<UsageEvents.Event> sUsageStatsCombiner = 63 new StatCombiner<UsageEvents.Event>() { 66 List<UsageEvents.Event> accResult) { 91 UsageEvents.Event event = new UsageEvents.Event(); in populateIntervalStats() 95 event.mEventType = UsageEvents.Event.ACTIVITY_RESUMED; in populateIntervalStats() 124 List<UsageEvents.Event> temp = sUsageStatsDatabase.queryUsageStats( in runQueryUsageStatsTest()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | BackgroundInstallControlService.java | 25 import android.app.usage.UsageEvents; 256 (UsageEvents.Event) msg.obj, msg.arg1 /* userId */); in handleMessage() 396 void handleUsageEvent(UsageEvents.Event event, int userId) { in handleUsageEvent() 397 if (event.mEventType != UsageEvents.Event.ACTIVITY_RESUMED in handleUsageEvent() 398 && event.mEventType != UsageEvents.Event.ACTIVITY_PAUSED in handleUsageEvent() 399 && event.mEventType != UsageEvents.Event.ACTIVITY_STOPPED) { in handleUsageEvent() 416 if (event.mEventType != UsageEvents.Event.ACTIVITY_RESUMED) { in handleUsageEvent() 588 public void addEvent(UsageEvents.Event event) { in addEvent() 590 case UsageEvents.Event.ACTIVITY_RESUMED: in addEvent() 593 case UsageEvents.Event.ACTIVITY_PAUSED: in addEvent() [all …]
|
/frameworks/base/core/tests/coretests/src/android/app/usage/ |
D | UsageStatsTest.java | 19 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 …]
|
D | UsageStatsPersistenceTest.java | 93 final UsageEvents.Event event = new UsageEvents.Event(); in testUsageEventsFields()
|
D | EventListTest.java | 38 private UsageEvents.Event getUsageEvent(long timeStamp) { in getUsageEvent() 39 final UsageEvents.Event event = new UsageEvents.Event(); in getUsageEvent()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | BackgroundInstallControlServiceTest.java | 38 import android.app.usage.UsageEvents; 39 import android.app.usage.UsageEvents.Event; 410 generateUsageEvent(UsageEvents.Event.ACTIVITY_RESUMED, USER_ID_1, INSTALLER_NAME_1, 0); in testHandleUsageEvent_permissionDenied() 423 generateUsageEvent(UsageEvents.Event.ACTIVITY_RESUMED, USER_ID_1, INSTALLER_NAME_1, 0); in testHandleUsageEvent_permissionGranted() 436 generateUsageEvent(UsageEvents.Event.USER_INTERACTION, USER_ID_1, INSTALLER_NAME_1, 0); in testHandleUsageEvent_ignoredEvent() 450 UsageEvents.Event.ACTIVITY_RESUMED, in testHandleUsageEvent_firstActivityResumedHalfTimeFrame() 477 UsageEvents.Event.ACTIVITY_RESUMED, in testHandleUsageEvent_firstActivityResumedOneTimeFrame() 506 UsageEvents.Event.ACTIVITY_RESUMED, in testHandleUsageEvent_firstActivityResumedOneAndHalfTimeFrame() 513 UsageEvents.Event.ACTIVITY_RESUMED, in testHandleUsageEvent_firstActivityResumedOneAndHalfTimeFrame() 629 UsageEvents.Event.ACTIVITY_RESUMED, in testHandleUsageEvent_packageAddedInsideTimeFrame() [all …]
|
/frameworks/base/services/core/java/android/app/usage/ |
D | UsageStatsManagerInternal.java | 249 public abstract UsageEvents queryEventsForUser(@UserIdInt int userId, long beginTime, in queryEventsForUser() 366 void onUsageEvent(@UserIdInt int userId, @NonNull UsageEvents.Event event); in onUsageEvent()
|