Lines Matching defs:event

156             const ActivityEvent *event = &mUnpublishedEvents[i];
157 if (event->eventIndex == (uint8_t)(mNewestPublishedEventIndex + 1)) {
158 PublishEvent(*event);
172 void ActivityContext::PublishEvent(const ActivityEvent& event) {
176 int64_t timestampDelta = event.whenNs - mNewestPublishedTimestamp;
178 mNewestPublishedTimestamp = event.whenNs;
181 halEvent.activity = GetActivityHandleFromSensorIndex(event.sensorIndex);
184 if (event.sensorIndex == COMMS_SENSOR_ACTIVITY_TILTING) {
185 ALOGD("Publishing tilt event (enter/exit)");
193 ALOGD("Publishing event - activity_handle: %d, event_type: %d"
197 // Just a single event is required for all other activity types.
198 halEvent.event_type = GetActivityTypeFromSensorIndex(event.sensorIndex);
202 mNewestPublishedEventIndex = event.eventIndex;
207 // Determine the current oldest buffered event.
210 const ActivityEvent *event = &mUnpublishedEvents[i];
211 if (event->whenNs < oldestEventTimestamp) {
212 oldestEventTimestamp = event->whenNs;
216 // If the age of the oldest buffered event is too large an AR sample
218 // ACTIVITY_EVENT_EXIT and the event ordering logic is reset.
221 ALOGD("Lost event detected, discarding buffered events");
235 // Reset the event reordering logic.
252 ActivityEvent event = {
260 PublishEvent(event);
264 mUnpublishedEvents.push(event);
270 // event via the AR HAL.
276 // For each flush event from the sensor hub, decrement the counter of
299 // Reset the unpublished event queue and clear the last known published
300 // event index.
325 // Ensure that the event type is either an ENTER or EXIT.