Lines Matching refs:entry
43 bool InputState::trackKey(const KeyEntry& entry, int32_t action, int32_t flags) { in trackKey() argument
46 if (entry.flags & AKEY_EVENT_FLAG_FALLBACK) { in trackKey()
48 if (mFallbackKeys.valueAt(i) == entry.keyCode) { in trackKey()
55 ssize_t index = findKeyMemento(entry); in trackKey()
80 ssize_t index = findKeyMemento(entry); in trackKey()
84 addKeyMemento(entry, flags); in trackKey()
93 bool InputState::trackMotion(const MotionEntry& entry, int32_t action, int32_t flags) { in trackMotion() argument
98 ssize_t index = findMotionMemento(entry, false /*hovering*/); in trackMotion()
106 entry.deviceId, entry.source, entry.displayId, actionMasked); in trackMotion()
112 ssize_t index = findMotionMemento(entry, false /*hovering*/); in trackMotion()
116 addMotionMemento(entry, flags, false /*hovering*/); in trackMotion()
123 if (entry.source & AINPUT_SOURCE_CLASS_NAVIGATION) { in trackMotion()
130 ssize_t index = findMotionMemento(entry, false /*hovering*/); in trackMotion()
132 if (entry.source & AINPUT_SOURCE_CLASS_JOYSTICK) { in trackMotion()
139 if (entry.pointerCoords[0].isEmpty()) { in trackMotion()
143 memento.setPointers(entry); in trackMotion()
145 } else if (!entry.pointerCoords[0].isEmpty()) { in trackMotion()
146 addMotionMemento(entry, flags, false /*hovering*/); in trackMotion()
156 memento.setPointers(entry); in trackMotion()
163 entry.deviceId, entry.source, entry.displayId, actionMasked); in trackMotion()
169 ssize_t index = findMotionMemento(entry, true /*hovering*/); in trackMotion()
177 entry.deviceId, entry.source, entry.displayId); in trackMotion()
184 ssize_t index = findMotionMemento(entry, true /*hovering*/); in trackMotion()
188 addMotionMemento(entry, flags, true /*hovering*/); in trackMotion()
197 ssize_t InputState::findKeyMemento(const KeyEntry& entry) const { in findKeyMemento()
200 if (memento.deviceId == entry.deviceId && memento.source == entry.source && in findKeyMemento()
201 memento.displayId == entry.displayId && memento.keyCode == entry.keyCode && in findKeyMemento()
202 memento.scanCode == entry.scanCode) { in findKeyMemento()
209 ssize_t InputState::findMotionMemento(const MotionEntry& entry, bool hovering) const { in findMotionMemento() argument
212 if (memento.deviceId == entry.deviceId && memento.source == entry.source && in findMotionMemento()
213 memento.displayId == entry.displayId && memento.hovering == hovering) { in findMotionMemento()
220 void InputState::addKeyMemento(const KeyEntry& entry, int32_t flags) { in addKeyMemento() argument
222 memento.deviceId = entry.deviceId; in addKeyMemento()
223 memento.source = entry.source; in addKeyMemento()
224 memento.displayId = entry.displayId; in addKeyMemento()
225 memento.keyCode = entry.keyCode; in addKeyMemento()
226 memento.scanCode = entry.scanCode; in addKeyMemento()
227 memento.metaState = entry.metaState; in addKeyMemento()
229 memento.downTime = entry.downTime; in addKeyMemento()
230 memento.policyFlags = entry.policyFlags; in addKeyMemento()
234 void InputState::addMotionMemento(const MotionEntry& entry, int32_t flags, bool hovering) { in addMotionMemento() argument
236 memento.deviceId = entry.deviceId; in addMotionMemento()
237 memento.source = entry.source; in addMotionMemento()
238 memento.displayId = entry.displayId; in addMotionMemento()
240 memento.xPrecision = entry.xPrecision; in addMotionMemento()
241 memento.yPrecision = entry.yPrecision; in addMotionMemento()
242 memento.xCursorPosition = entry.xCursorPosition; in addMotionMemento()
243 memento.yCursorPosition = entry.yCursorPosition; in addMotionMemento()
244 memento.downTime = entry.downTime; in addMotionMemento()
245 memento.setPointers(entry); in addMotionMemento()
247 memento.policyFlags = entry.policyFlags; in addMotionMemento()
251 void InputState::MotionMemento::setPointers(const MotionEntry& entry) { in setPointers() argument
252 pointerCount = entry.pointerCount; in setPointers()
253 for (uint32_t i = 0; i < entry.pointerCount; i++) { in setPointers()
254 pointerProperties[i].copyFrom(entry.pointerProperties[i]); in setPointers()
255 pointerCoords[i].copyFrom(entry.pointerCoords[i]); in setPointers()