Lines Matching refs:args

132 static int32_t getActionUpForPointerId(const NotifyMotionArgs& args, int32_t pointerId) {  in getActionUpForPointerId()  argument
133 for (size_t i = 0; i < args.getPointerCount(); i++) { in getActionUpForPointerId()
134 if (pointerId == args.pointerProperties[i].id) { in getActionUpForPointerId()
139 LOG_ALWAYS_FATAL("Can't find pointerId %" PRId32 " in %s", pointerId, args.dump().c_str()); in getActionUpForPointerId()
164 NotifyMotionArgs removePointerIds(const NotifyMotionArgs& args, in removePointerIds() argument
166 const uint8_t actionIndex = MotionEvent::getActionIndex(args.action); in removePointerIds()
167 const int32_t actionMasked = MotionEvent::getActionMasked(args.action); in removePointerIds()
171 NotifyMotionArgs newArgs{args}; in removePointerIds()
175 for (uint32_t i = 0; i < args.getPointerCount(); i++) { in removePointerIds()
176 const int32_t pointerId = args.pointerProperties[i].id; in removePointerIds()
187 newArgs.pointerProperties.push_back(args.pointerProperties[i]); in removePointerIds()
188 newArgs.pointerCoords.push_back(args.pointerCoords[i]); in removePointerIds()
215 static std::optional<NotifyMotionArgs> removeStylusPointerIds(const NotifyMotionArgs& args) { in removeStylusPointerIds() argument
217 for (uint32_t i = 0; i < args.getPointerCount(); i++) { in removeStylusPointerIds()
218 if (isStylusToolType(args.pointerProperties[i].toolType)) { in removeStylusPointerIds()
219 stylusPointerIds.insert(args.pointerProperties[i].id); in removeStylusPointerIds()
222 NotifyMotionArgs withoutStylusPointers = removePointerIds(args, stylusPointerIds); in removeStylusPointerIds()
287 const NotifyMotionArgs& args, const std::set<int32_t>& oldSuppressedPointerIds, in cancelSuppressedPointers() argument
289 LOG_ALWAYS_FATAL_IF(args.getPointerCount() == 0, "0 pointers in %s", args.dump().c_str()); in cancelSuppressedPointers()
292 NotifyMotionArgs oldArgs = removePointerIds(args, oldSuppressedPointerIds); in cancelSuppressedPointers()
297 args.pointerProperties[MotionEvent::getActionIndex(args.action)].id; in cancelSuppressedPointers()
298 const int32_t actionMasked = MotionEvent::getActionMasked(args.action); in cancelSuppressedPointers()
346 const NotifyConfigurationChangedArgs& args) { in notifyConfigurationChanged() argument
347 mQueuedListener.notifyConfigurationChanged(args); in notifyConfigurationChanged()
351 void UnwantedInteractionBlocker::notifyKey(const NotifyKeyArgs& args) { in notifyKey() argument
352 mQueuedListener.notifyKey(args); in notifyKey()
356 void UnwantedInteractionBlocker::notifyMotion(const NotifyMotionArgs& args) { in notifyMotion() argument
357 ALOGD_IF(DEBUG_INBOUND_MOTION, "%s: %s", __func__, args.dump().c_str()); in notifyMotion()
361 notifyMotionLocked(args); in notifyMotion()
364 mPreferStylusOverTouchBlocker.processMotion(args); in notifyMotion()
375 void UnwantedInteractionBlocker::enqueueOutboundMotionLocked(const NotifyMotionArgs& args) { in enqueueOutboundMotionLocked() argument
376 ALOGD_IF(DEBUG_OUTBOUND_MOTION, "%s: %s", __func__, args.dump().c_str()); in enqueueOutboundMotionLocked()
377 mQueuedListener.notifyMotion(args); in enqueueOutboundMotionLocked()
380 void UnwantedInteractionBlocker::notifyMotionLocked(const NotifyMotionArgs& args) { in notifyMotionLocked() argument
381 auto it = mPalmRejectors.find(args.deviceId); in notifyMotionLocked()
382 const bool sendToPalmRejector = it != mPalmRejectors.end() && isFromTouchscreen(args.source); in notifyMotionLocked()
384 enqueueOutboundMotionLocked(args); in notifyMotionLocked()
388 std::vector<NotifyMotionArgs> processedArgs = it->second.processMotion(args); in notifyMotionLocked()
394 void UnwantedInteractionBlocker::notifySwitch(const NotifySwitchArgs& args) { in notifySwitch() argument
395 mQueuedListener.notifySwitch(args); in notifySwitch()
399 void UnwantedInteractionBlocker::notifySensor(const NotifySensorArgs& args) { in notifySensor() argument
400 mQueuedListener.notifySensor(args); in notifySensor()
404 void UnwantedInteractionBlocker::notifyVibratorState(const NotifyVibratorStateArgs& args) { in notifyVibratorState() argument
405 mQueuedListener.notifyVibratorState(args); in notifyVibratorState()
408 void UnwantedInteractionBlocker::notifyDeviceReset(const NotifyDeviceResetArgs& args) { in notifyDeviceReset() argument
411 auto it = mPalmRejectors.find(args.deviceId); in notifyDeviceReset()
416 mPalmRejectors.emplace(args.deviceId, info); in notifyDeviceReset()
418 mQueuedListener.notifyDeviceReset(args); in notifyDeviceReset()
419 mPreferStylusOverTouchBlocker.notifyDeviceReset(args); in notifyDeviceReset()
426 const NotifyPointerCaptureChangedArgs& args) { in notifyPointerCaptureChanged() argument
427 mQueuedListener.notifyPointerCaptureChanged(args); in notifyPointerCaptureChanged()
432 const NotifyInputDevicesChangedArgs& args) { in notifyInputDevicesChanged() argument
433 onInputDevicesChanged(args.inputDeviceInfos); in notifyInputDevicesChanged()
434 mQueuedListener.notify(args); in notifyInputDevicesChanged()
493 void SlotState::update(const NotifyMotionArgs& args) { in update() argument
494 for (size_t i = 0; i < args.getPointerCount(); i++) { in update()
495 const int32_t pointerId = args.pointerProperties[i].id; in update()
496 const int32_t resolvedAction = resolveActionForPointer(i, args.action); in update()
586 std::vector<::ui::InProgressTouchEvdev> getTouches(const NotifyMotionArgs& args, in getTouches() argument
592 for (size_t i = 0; i < args.getPointerCount(); i++) { in getTouches()
593 const int32_t pointerId = args.pointerProperties[i].id; in getTouches()
595 touches.back().major = args.pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR); in getTouches()
596 touches.back().minor = args.pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR); in getTouches()
621 const int32_t resolvedAction = resolveActionForPointer(i, args.action); in getTouches()
630 touches.back().x = args.pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_X); in getTouches()
631 touches.back().y = args.pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_Y); in getTouches()
643 touches.back().pressure = args.pointerCoords[i].getAxisValue(AMOTION_EVENT_AXIS_PRESSURE); in getTouches()
644 touches.back().tool_code = getLinuxToolCode(args.pointerProperties[i].toolType); in getTouches()
653 std::set<int32_t> PalmRejector::detectPalmPointers(const NotifyMotionArgs& args) { in detectPalmPointers() argument
660 mSlotState.update(args); in detectPalmPointers()
663 getTouches(args, mDeviceInfo, oldSlotState, mSlotState); in detectPalmPointers()
664 ::base::TimeTicks chromeTimestamp = toChromeTimestamp(args.eventTime); in detectPalmPointers()
681 for (size_t i = 0; i < args.getPointerCount(); i++) { in detectPalmPointers()
682 const int32_t pointerId = args.pointerProperties[i].id; in detectPalmPointers()
695 std::vector<NotifyMotionArgs> PalmRejector::processMotion(const NotifyMotionArgs& args) { in processMotion() argument
697 return {args}; in processMotion()
699 const bool skipThisEvent = args.action == AMOTION_EVENT_ACTION_HOVER_ENTER || in processMotion()
700 args.action == AMOTION_EVENT_ACTION_HOVER_MOVE || in processMotion()
701 args.action == AMOTION_EVENT_ACTION_HOVER_EXIT || in processMotion()
702 args.action == AMOTION_EVENT_ACTION_BUTTON_PRESS || in processMotion()
703 args.action == AMOTION_EVENT_ACTION_BUTTON_RELEASE || in processMotion()
704 args.action == AMOTION_EVENT_ACTION_SCROLL; in processMotion()
707 return {args}; in processMotion()
709 if (args.action == AMOTION_EVENT_ACTION_DOWN) { in processMotion()
716 std::optional<NotifyMotionArgs> touchOnlyArgs = removeStylusPointerIds(args); in processMotion()
726 cancelSuppressedPointers(args, oldSuppressedIds, mSuppressedPointerIds); in processMotion()
736 dumpSet(mSuppressedPointerIds).c_str(), ns2ms(args.eventTime - args.downTime), in processMotion()
737 args.dump().c_str()); in processMotion()