Lines Matching refs:memento
33 for (const MotionMemento& memento : mMotionMementos) { in isHovering() local
34 if (memento.deviceId == deviceId && memento.source == source && in isHovering()
35 memento.displayId == displayId && memento.hovering) { in isHovering()
154 MotionMemento& memento = mMotionMementos[index]; in trackMotion() local
155 memento.setPointers(entry); in trackMotion()
166 MotionMemento& memento = mMotionMementos[index]; in trackMotion() local
167 if (memento.firstNewPointerIdx < 0) { in trackMotion()
168 memento.setPointers(entry); in trackMotion()
213 const KeyMemento& memento = mKeyMementos[i]; in findKeyMemento() local
214 if (memento.deviceId == entry.deviceId && memento.source == entry.source && in findKeyMemento()
215 memento.displayId == entry.displayId && memento.keyCode == entry.keyCode && in findKeyMemento()
216 memento.scanCode == entry.scanCode) { in findKeyMemento()
225 const MotionMemento& memento = mMotionMementos[i]; in findMotionMemento() local
226 if (memento.deviceId == entry.deviceId && memento.source == entry.source && in findMotionMemento()
227 memento.displayId == entry.displayId && memento.hovering == hovering) { in findMotionMemento()
235 KeyMemento memento; in addKeyMemento() local
236 memento.deviceId = entry.deviceId; in addKeyMemento()
237 memento.source = entry.source; in addKeyMemento()
238 memento.displayId = entry.displayId; in addKeyMemento()
239 memento.keyCode = entry.keyCode; in addKeyMemento()
240 memento.scanCode = entry.scanCode; in addKeyMemento()
241 memento.metaState = entry.metaState; in addKeyMemento()
242 memento.flags = flags; in addKeyMemento()
243 memento.downTime = entry.downTime; in addKeyMemento()
244 memento.policyFlags = entry.policyFlags; in addKeyMemento()
245 mKeyMementos.push_back(memento); in addKeyMemento()
249 MotionMemento memento; in addMotionMemento() local
250 memento.deviceId = entry.deviceId; in addMotionMemento()
251 memento.source = entry.source; in addMotionMemento()
252 memento.displayId = entry.displayId; in addMotionMemento()
253 memento.flags = flags; in addMotionMemento()
254 memento.xPrecision = entry.xPrecision; in addMotionMemento()
255 memento.yPrecision = entry.yPrecision; in addMotionMemento()
256 memento.xCursorPosition = entry.xCursorPosition; in addMotionMemento()
257 memento.yCursorPosition = entry.yCursorPosition; in addMotionMemento()
258 memento.downTime = entry.downTime; in addMotionMemento()
259 memento.setPointers(entry); in addMotionMemento()
260 memento.hovering = hovering; in addMotionMemento()
261 memento.policyFlags = entry.policyFlags; in addMotionMemento()
262 mMotionMementos.push_back(memento); in addMotionMemento()
381 const MotionMemento& memento = mMotionMementos.back(); in cancelConflictingInputStream() local
385 createCancelEntryForMemento(memento, motionEntry.eventTime); in cancelConflictingInputStream()
393 std::unique_ptr<MotionEntry> InputState::createCancelEntryForMemento(const MotionMemento& memento, in createCancelEntryForMemento() argument
396 memento.hovering ? AMOTION_EVENT_ACTION_HOVER_EXIT : AMOTION_EVENT_ACTION_CANCEL; in createCancelEntryForMemento()
397 int32_t flags = memento.flags; in createCancelEntryForMemento()
402 eventTime, memento.deviceId, memento.source, in createCancelEntryForMemento()
403 memento.displayId, memento.policyFlags, action, in createCancelEntryForMemento()
406 AMOTION_EVENT_EDGE_FLAG_NONE, memento.xPrecision, in createCancelEntryForMemento()
407 memento.yPrecision, memento.xCursorPosition, in createCancelEntryForMemento()
408 memento.yCursorPosition, memento.downTime, in createCancelEntryForMemento()
409 memento.pointerProperties, memento.pointerCoords); in createCancelEntryForMemento()
415 for (KeyMemento& memento : mKeyMementos) { in synthesizeCancelationEvents()
416 if (shouldCancelKey(memento, options)) { in synthesizeCancelationEvents()
419 currentTime, memento.deviceId, memento.source, in synthesizeCancelationEvents()
420 memento.displayId, memento.policyFlags, in synthesizeCancelationEvents()
422 memento.flags | AKEY_EVENT_FLAG_CANCELED, in synthesizeCancelationEvents()
423 memento.keyCode, memento.scanCode, memento.metaState, in synthesizeCancelationEvents()
424 /*repeatCount=*/0, memento.downTime)); in synthesizeCancelationEvents()
428 for (const MotionMemento& memento : mMotionMementos) { in synthesizeCancelationEvents() local
429 if (shouldCancelMotion(memento, options)) { in synthesizeCancelationEvents()
431 events.push_back(createCancelEntryForMemento(memento, currentTime)); in synthesizeCancelationEvents()
434 synthesizeCancelationEventsForPointers(memento, options.pointerIds.value(), in synthesizeCancelationEvents()
447 for (MotionMemento& memento : mMotionMementos) { in synthesizePointerDownEvents()
448 if (!isFromSource(memento.source, AINPUT_SOURCE_CLASS_POINTER)) { in synthesizePointerDownEvents()
452 if (memento.firstNewPointerIdx < 0) { in synthesizePointerDownEvents()
460 for (uint32_t i = 0; i < static_cast<uint32_t>(memento.firstNewPointerIdx); i++) { in synthesizePointerDownEvents()
461 pointerProperties.push_back(memento.pointerProperties[i]); in synthesizePointerDownEvents()
462 pointerCoords.push_back(memento.pointerCoords[i]); in synthesizePointerDownEvents()
466 for (uint32_t i = static_cast<uint32_t>(memento.firstNewPointerIdx); in synthesizePointerDownEvents()
467 i < memento.getPointerCount(); i++) { in synthesizePointerDownEvents()
468 pointerProperties.push_back(memento.pointerProperties[i]); in synthesizePointerDownEvents()
469 pointerCoords.push_back(memento.pointerCoords[i]); in synthesizePointerDownEvents()
481 currentTime, memento.deviceId, memento.source, in synthesizePointerDownEvents()
482 memento.displayId, memento.policyFlags, action, in synthesizePointerDownEvents()
483 /*actionButton=*/0, memento.flags, AMETA_NONE, in synthesizePointerDownEvents()
485 AMOTION_EVENT_EDGE_FLAG_NONE, memento.xPrecision, in synthesizePointerDownEvents()
486 memento.yPrecision, memento.xCursorPosition, in synthesizePointerDownEvents()
487 memento.yCursorPosition, memento.downTime, in synthesizePointerDownEvents()
491 memento.firstNewPointerIdx = INVALID_POINTER_INDEX; in synthesizePointerDownEvents()
498 const MotionMemento& memento, std::bitset<MAX_POINTER_ID + 1> pointerIds, in synthesizeCancelationEventsForPointers() argument
503 for (uint32_t pointerIdx = 0; pointerIdx < memento.getPointerCount(); pointerIdx++) { in synthesizeCancelationEventsForPointers()
504 uint32_t pointerId = uint32_t(memento.pointerProperties[pointerIdx].id); in synthesizeCancelationEventsForPointers()
510 if (canceledPointerIndices.size() == memento.getPointerCount()) { in synthesizeCancelationEventsForPointers()
512 events.emplace_back(createCancelEntryForMemento(memento, currentTime)); in synthesizeCancelationEventsForPointers()
525 std::vector<PointerProperties> pointerProperties = memento.pointerProperties; in synthesizeCancelationEventsForPointers()
526 std::vector<PointerCoords> pointerCoords = memento.pointerCoords; in synthesizeCancelationEventsForPointers()
535 currentTime, memento.deviceId, memento.source, in synthesizeCancelationEventsForPointers()
536 memento.displayId, memento.policyFlags, action, in synthesizeCancelationEventsForPointers()
538 memento.flags | AMOTION_EVENT_FLAG_CANCELED, in synthesizeCancelationEventsForPointers()
541 AMOTION_EVENT_EDGE_FLAG_NONE, memento.xPrecision, in synthesizeCancelationEventsForPointers()
542 memento.yPrecision, memento.xCursorPosition, in synthesizeCancelationEventsForPointers()
543 memento.yCursorPosition, memento.downTime, in synthesizeCancelationEventsForPointers()
561 MotionMemento& memento = mMotionMementos[i]; in mergePointerStateTo() local
564 if (isFromSource(memento.source, AINPUT_SOURCE_CLASS_POINTER)) { in mergePointerStateTo()
568 if (memento.deviceId == otherMemento.deviceId && in mergePointerStateTo()
569 memento.source == otherMemento.source && in mergePointerStateTo()
570 memento.displayId == otherMemento.displayId) { in mergePointerStateTo()
571 memento.mergePointerStateTo(otherMemento); in mergePointerStateTo()
577 memento.firstNewPointerIdx = 0; in mergePointerStateTo()
578 other.mMotionMementos.push_back(memento); in mergePointerStateTo()
600 bool InputState::shouldCancelKey(const KeyMemento& memento, const CancelationOptions& options) { in shouldCancelKey() argument
601 if (options.keyCode && memento.keyCode != options.keyCode.value()) { in shouldCancelKey()
605 if (options.deviceId && memento.deviceId != options.deviceId.value()) { in shouldCancelKey()
609 if (options.displayId && memento.displayId != options.displayId.value()) { in shouldCancelKey()
618 return memento.flags & AKEY_EVENT_FLAG_FALLBACK; in shouldCancelKey()
624 bool InputState::shouldCancelMotion(const MotionMemento& memento, in shouldCancelMotion() argument
626 if (options.deviceId && memento.deviceId != options.deviceId.value()) { in shouldCancelMotion()
630 if (options.displayId && memento.displayId != options.displayId.value()) { in shouldCancelMotion()
638 return memento.source & AINPUT_SOURCE_CLASS_POINTER; in shouldCancelMotion()
640 return !(memento.source & AINPUT_SOURCE_CLASS_POINTER); in shouldCancelMotion()
649 for (const InputState::MotionMemento& memento : state.mMotionMementos) { in operator <<() local
650 out << "{deviceId= " << memento.deviceId << ", hovering=" << memento.hovering << "}, "; in operator <<()