Searched refs:EventIndex (Results 1 – 12 of 12) sorted by relevance
68 public class EventIndex { class69 private static final String TAG = EventIndex.class.getSimpleName();93 static final EventIndex EMPTY = new EventIndex();98 EventIndex::createOneDayLongTimeSlot,99 EventIndex::createFourHoursLongTimeSlot,100 EventIndex::createOneHourLongTimeSlot,101 EventIndex::createTwoMinutesLongTimeSlot106 static EventIndex combine(EventIndex lhs, EventIndex rhs) { in combine()107 EventIndex older = lhs.mLastUpdatedTime < rhs.mLastUpdatedTime ? lhs : rhs; in combine()108 EventIndex younger = lhs.mLastUpdatedTime >= rhs.mLastUpdatedTime ? lhs : rhs; in combine()[all …]
63 private final SparseArray<EventIndex> mEventIndexArray = new SparseArray<>();135 SparseArray<EventIndex> diskIndexes = in loadFromDisk()157 public synchronized EventIndex getEventIndex(@Event.EventType int eventType) { in getEventIndex()158 EventIndex eventIndex = mEventIndexArray.get(eventType); in getEventIndex()159 return eventIndex != null ? new EventIndex(eventIndex) : mInjector.createEventIndex(); in getEventIndex()164 public synchronized EventIndex getEventIndex(Set<Integer> eventTypes) { in getEventIndex()165 EventIndex combined = mInjector.createEventIndex(); in getEventIndex()167 EventIndex eventIndex = mEventIndexArray.get(eventType); in getEventIndex()169 combined = EventIndex.combine(combined, eventIndex); in getEventIndex()207 EventIndex eventIndex = mEventIndexArray.get(event.getType()); in addEventInMemory()[all …]
32 public EventIndex getEventIndex(int eventType) { in getEventIndex()34 EventIndex eventIndex = eventHistory.getEventIndex(eventType); in getEventIndex()39 return EventIndex.EMPTY; in getEventIndex()44 public EventIndex getEventIndex(Set<Integer> eventTypes) { in getEventIndex()45 EventIndex merged = null; in getEventIndex()47 EventIndex eventIndex = eventHistory.getEventIndex(eventTypes); in getEventIndex()51 merged = EventIndex.combine(merged, eventIndex); in getEventIndex()54 return merged != null ? merged : EventIndex.EMPTY; in getEventIndex()62 EventIndex eventIndex = eventHistory.getEventIndex(eventTypes); in queryEvents()
29 EventIndex getEventIndex(@Event.EventType int eventType); in getEventIndex()33 EventIndex getEventIndex(Set<Integer> eventTypes); in getEventIndex()
58 private static final EventIndex.Injector EVENT_INDEX_INJECTOR = new EventIndex.Injector() {67 EventIndex createEventIndex() {68 return new EventIndex(EVENT_INDEX_INJECTOR);99 EventIndex eventIndex = mEventHistory.getEventIndex(Event.ALL_EVENT_TYPES); in testNoEvents()113 EventIndex eventIndex = mEventHistory.getEventIndex(Event.ALL_EVENT_TYPES); in testMultipleEvents()127 EventIndex eventIndex = mEventHistory.getEventIndex(Event.NOTIFICATION_EVENT_TYPES); in testQuerySomeEventTypes()142 EventIndex eventIndex = mEventHistory.getEventIndex(Event.TYPE_SHARE_IMAGE); in testQuerySingleEventType()163 EventIndex indexBeforePowerOff = mEventHistory.getEventIndex(Event.ALL_EVENT_TYPES); in testPersistenceAndRestoration()171 EventIndex indexAfterPowerOff = mEventHistory.getEventIndex(Event.ALL_EVENT_TYPES); in testPersistenceAndRestoration()184 EventIndex indexBeforePowerOff = mEventHistory.getEventIndex(Event.ALL_EVENT_TYPES); in testMimicDevicePowerOff()[all …]
44 private EventIndex mEventIndex;49 mEventIndex = new EventIndex(mInjector); in setUp()122 EventIndex newIndex = new EventIndex(mEventIndex); in testCopyConstructor()133 EventIndex a = new EventIndex(mInjector); in combineEventIndexes()140 EventIndex b = new EventIndex(mInjector); in combineEventIndexes()144 EventIndex combined = EventIndex.combine(a, b); in combineEventIndexes()159 private class TestInjector extends EventIndex.Injector {
55 private EventIndex.Injector mInjector = new EventIndex.Injector() {95 EventIndex eventIndex; in testQueryEventIndexForSingleEventType()112 EventIndex eventIndex; in testQueryEventIndexForMultipleEventTypes()137 EventIndex createEventIndex() { in createEventIndex()138 return new EventIndex(mInjector); in createEventIndex()
369 private static final EventIndex.Injector EVENT_INDEX_INJECTOR = new EventIndex.Injector() {378 EventIndex createEventIndex() {379 return new EventIndex(EVENT_INDEX_INJECTOR);
38 import com.android.server.people.data.EventIndex;97 private EventIndex mEventIndex1;99 private EventIndex mEventIndex2;101 private EventIndex mEventIndex3;103 private EventIndex mEventIndex4;105 private EventIndex mEventIndex5;107 private EventIndex mEventIndex6;109 private EventIndex mEventIndex7;111 private EventIndex mEventIndex8;113 private EventIndex mEventIndex9;[all …]
47 import com.android.server.people.data.EventIndex;87 @Mock private EventIndex mEventIndex1;88 @Mock private EventIndex mEventIndex2;89 @Mock private EventIndex mEventIndex3;90 @Mock private EventIndex mEventIndex4;91 @Mock private EventIndex mEventIndex5;92 @Mock private EventIndex mEventIndex6;
88 // Index of events' time distributions (com.android.server.people.data.EventIndex).
22917 PLcom/android/server/people/data/-$$Lambda$EventIndex$5vJ4iTv1E2na1FXUge8q9OUVsxo;-><clinit>()V22918 PLcom/android/server/people/data/-$$Lambda$EventIndex$5vJ4iTv1E2na1FXUge8q9OUVsxo;-><init>()V22919 PLcom/android/server/people/data/-$$Lambda$EventIndex$5vJ4iTv1E2na1FXUge8q9OUVsxo;->apply(Ljava/lan…22920 PLcom/android/server/people/data/-$$Lambda$EventIndex$G8WkLHrQiIIwWFEZDn-UhnYOqD4;-><clinit>()V22921 PLcom/android/server/people/data/-$$Lambda$EventIndex$G8WkLHrQiIIwWFEZDn-UhnYOqD4;-><init>()V22922 PLcom/android/server/people/data/-$$Lambda$EventIndex$G8WkLHrQiIIwWFEZDn-UhnYOqD4;->apply(Ljava/lan…22923 PLcom/android/server/people/data/-$$Lambda$EventIndex$Nd5ot_vT3MfYlbajA1zcoqOlGW8;-><clinit>()V22924 PLcom/android/server/people/data/-$$Lambda$EventIndex$Nd5ot_vT3MfYlbajA1zcoqOlGW8;-><init>()V22925 PLcom/android/server/people/data/-$$Lambda$EventIndex$Nd5ot_vT3MfYlbajA1zcoqOlGW8;->apply(Ljava/lan…22926 PLcom/android/server/people/data/-$$Lambda$EventIndex$OSX9HM2LXKK0pNoaI_v3ROQ6Z58;-><clinit>()V[all …]