Lines Matching refs:motion
109 body.motion.pointerCount > 0 && body.motion.pointerCount <= MAX_POINTERS; in isValid()
111 ALOGE("Received invalid MOTION: pointerCount = %" PRIu32, body.motion.pointerCount); in isValid()
143 return sizeof(Header) + body.motion.size(); in size()
202 msg->body.motion.eventId = body.motion.eventId; in getSanitizedCopy()
204 msg->body.motion.eventTime = body.motion.eventTime; in getSanitizedCopy()
206 msg->body.motion.deviceId = body.motion.deviceId; in getSanitizedCopy()
208 msg->body.motion.source = body.motion.source; in getSanitizedCopy()
210 msg->body.motion.displayId = body.motion.displayId; in getSanitizedCopy()
212 msg->body.motion.hmac = body.motion.hmac; in getSanitizedCopy()
214 msg->body.motion.action = body.motion.action; in getSanitizedCopy()
216 msg->body.motion.actionButton = body.motion.actionButton; in getSanitizedCopy()
218 msg->body.motion.flags = body.motion.flags; in getSanitizedCopy()
220 msg->body.motion.metaState = body.motion.metaState; in getSanitizedCopy()
222 msg->body.motion.buttonState = body.motion.buttonState; in getSanitizedCopy()
224 msg->body.motion.classification = body.motion.classification; in getSanitizedCopy()
226 msg->body.motion.edgeFlags = body.motion.edgeFlags; in getSanitizedCopy()
228 msg->body.motion.downTime = body.motion.downTime; in getSanitizedCopy()
230 msg->body.motion.dsdx = body.motion.dsdx; in getSanitizedCopy()
231 msg->body.motion.dtdx = body.motion.dtdx; in getSanitizedCopy()
232 msg->body.motion.dtdy = body.motion.dtdy; in getSanitizedCopy()
233 msg->body.motion.dsdy = body.motion.dsdy; in getSanitizedCopy()
234 msg->body.motion.tx = body.motion.tx; in getSanitizedCopy()
235 msg->body.motion.ty = body.motion.ty; in getSanitizedCopy()
238 msg->body.motion.xPrecision = body.motion.xPrecision; in getSanitizedCopy()
240 msg->body.motion.yPrecision = body.motion.yPrecision; in getSanitizedCopy()
242 msg->body.motion.xCursorPosition = body.motion.xCursorPosition; in getSanitizedCopy()
244 msg->body.motion.yCursorPosition = body.motion.yCursorPosition; in getSanitizedCopy()
246 msg->body.motion.displayWidth = body.motion.displayWidth; in getSanitizedCopy()
248 msg->body.motion.displayHeight = body.motion.displayHeight; in getSanitizedCopy()
250 msg->body.motion.pointerCount = body.motion.pointerCount; in getSanitizedCopy()
252 for (size_t i = 0; i < body.motion.pointerCount; i++) { in getSanitizedCopy()
254 msg->body.motion.pointers[i].properties.id = body.motion.pointers[i].properties.id; in getSanitizedCopy()
255 msg->body.motion.pointers[i].properties.toolType = in getSanitizedCopy()
256 body.motion.pointers[i].properties.toolType, in getSanitizedCopy()
258 msg->body.motion.pointers[i].coords.bits = body.motion.pointers[i].coords.bits; in getSanitizedCopy()
259 const uint32_t count = BitSet64::count(body.motion.pointers[i].coords.bits); in getSanitizedCopy()
260 memcpy(&msg->body.motion.pointers[i].coords.values[0], in getSanitizedCopy()
261 &body.motion.pointers[i].coords.values[0], in getSanitizedCopy()
262 count * (sizeof(body.motion.pointers[i].coords.values[0]))); in getSanitizedCopy()
574 msg.body.motion.eventId = eventId; in publishMotionEvent()
575 msg.body.motion.deviceId = deviceId; in publishMotionEvent()
576 msg.body.motion.source = source; in publishMotionEvent()
577 msg.body.motion.displayId = displayId; in publishMotionEvent()
578 msg.body.motion.hmac = std::move(hmac); in publishMotionEvent()
579 msg.body.motion.action = action; in publishMotionEvent()
580 msg.body.motion.actionButton = actionButton; in publishMotionEvent()
581 msg.body.motion.flags = flags; in publishMotionEvent()
582 msg.body.motion.edgeFlags = edgeFlags; in publishMotionEvent()
583 msg.body.motion.metaState = metaState; in publishMotionEvent()
584 msg.body.motion.buttonState = buttonState; in publishMotionEvent()
585 msg.body.motion.classification = classification; in publishMotionEvent()
586 msg.body.motion.dsdx = transform.dsdx(); in publishMotionEvent()
587 msg.body.motion.dtdx = transform.dtdx(); in publishMotionEvent()
588 msg.body.motion.dtdy = transform.dtdy(); in publishMotionEvent()
589 msg.body.motion.dsdy = transform.dsdy(); in publishMotionEvent()
590 msg.body.motion.tx = transform.tx(); in publishMotionEvent()
591 msg.body.motion.ty = transform.ty(); in publishMotionEvent()
592 msg.body.motion.xPrecision = xPrecision; in publishMotionEvent()
593 msg.body.motion.yPrecision = yPrecision; in publishMotionEvent()
594 msg.body.motion.xCursorPosition = xCursorPosition; in publishMotionEvent()
595 msg.body.motion.yCursorPosition = yCursorPosition; in publishMotionEvent()
596 msg.body.motion.displayWidth = displayWidth; in publishMotionEvent()
597 msg.body.motion.displayHeight = displayHeight; in publishMotionEvent()
598 msg.body.motion.downTime = downTime; in publishMotionEvent()
599 msg.body.motion.eventTime = eventTime; in publishMotionEvent()
600 msg.body.motion.pointerCount = pointerCount; in publishMotionEvent()
602 msg.body.motion.pointers[i].properties.copyFrom(pointerProperties[i]); in publishMotionEvent()
603 msg.body.motion.pointers[i].coords.copyFrom(pointerCoords[i]); in publishMotionEvent()
761 ssize_t batchIndex = findBatch(mMsg.body.motion.deviceId, mMsg.body.motion.source); in consume()
771 } else if (isPointerEvent(mMsg.body.motion.source) && in consume()
772 mMsg.body.motion.action == AMOTION_EVENT_ACTION_CANCEL) { in consume()
801 if (mMsg.body.motion.action == AMOTION_EVENT_ACTION_MOVE || in consume()
802 mMsg.body.motion.action == AMOTION_EVENT_ACTION_HOVER_MOVE) { in consume()
936 if (!mResampleTouch || !isPointerEvent(msg.body.motion.source)) { in updateTouchState()
940 int32_t deviceId = msg.body.motion.deviceId; in updateTouchState()
941 int32_t source = msg.body.motion.source; in updateTouchState()
946 switch (msg.body.motion.action & AMOTION_EVENT_ACTION_MASK) { in updateTouchState()
973 touchState.lastResample.idBits.clearBit(msg.body.motion.getActionId()); in updateTouchState()
984 touchState.lastResample.idBits.clearBit(msg.body.motion.getActionId()); in updateTouchState()
1023 nsecs_t eventTime = msg.body.motion.eventTime; in rewriteMessage()
1024 for (uint32_t i = 0; i < msg.body.motion.pointerCount; i++) { in rewriteMessage()
1025 uint32_t id = msg.body.motion.pointers[i].properties.id; in rewriteMessage()
1029 PointerCoords& msgCoords = msg.body.motion.pointers[i].coords; in rewriteMessage()
1299 return head.body.motion.source; in getPendingBatchSource()
1306 if (head.body.motion.deviceId == deviceId && head.body.motion.source == source) { in findBatch()
1346 uint32_t pointerCount = msg->body.motion.pointerCount; in initializeMotionEvent()
1350 pointerProperties[i].copyFrom(msg->body.motion.pointers[i].properties); in initializeMotionEvent()
1351 pointerCoords[i].copyFrom(msg->body.motion.pointers[i].coords); in initializeMotionEvent()
1355 transform.set({msg->body.motion.dsdx, msg->body.motion.dtdx, msg->body.motion.tx, in initializeMotionEvent()
1356 msg->body.motion.dtdy, msg->body.motion.dsdy, msg->body.motion.ty, 0, 0, 1}); in initializeMotionEvent()
1357 event->initialize(msg->body.motion.eventId, msg->body.motion.deviceId, msg->body.motion.source, in initializeMotionEvent()
1358 msg->body.motion.displayId, msg->body.motion.hmac, msg->body.motion.action, in initializeMotionEvent()
1359 msg->body.motion.actionButton, msg->body.motion.flags, in initializeMotionEvent()
1360 msg->body.motion.edgeFlags, msg->body.motion.metaState, in initializeMotionEvent()
1361 msg->body.motion.buttonState, msg->body.motion.classification, transform, in initializeMotionEvent()
1362 msg->body.motion.xPrecision, msg->body.motion.yPrecision, in initializeMotionEvent()
1363 msg->body.motion.xCursorPosition, msg->body.motion.yCursorPosition, in initializeMotionEvent()
1364 msg->body.motion.displayWidth, msg->body.motion.displayHeight, in initializeMotionEvent()
1365 msg->body.motion.downTime, msg->body.motion.eventTime, pointerCount, in initializeMotionEvent()
1370 uint32_t pointerCount = msg->body.motion.pointerCount; in addSample()
1373 pointerCoords[i].copyFrom(msg->body.motion.pointers[i].coords); in addSample()
1376 event->setMetaState(event->getMetaState() | msg->body.motion.metaState); in addSample()
1377 event->addSample(msg->body.motion.eventTime, pointerCoords); in addSample()
1382 uint32_t pointerCount = msg->body.motion.pointerCount; in canAddSample()
1383 if (head.body.motion.pointerCount != pointerCount in canAddSample()
1384 || head.body.motion.action != msg->body.motion.action) { in canAddSample()
1388 if (head.body.motion.pointers[i].properties in canAddSample()
1389 != msg->body.motion.pointers[i].properties) { in canAddSample()
1399 while (index < numSamples && batch.samples[index].body.motion.eventTime <= time) { in findSampleNoLaterThan()
1428 out = out + "action=" + MotionEvent::actionToString(msg.body.motion.action); in dump()
1429 for (uint32_t i = 0; i < msg.body.motion.pointerCount; i++) { in dump()
1430 const float x = msg.body.motion.pointers[i].coords.getX(); in dump()
1431 const float y = msg.body.motion.pointers[i].coords.getY(); in dump()