Home
last modified time | relevance | path

Searched refs:motionArgs (Results 1 – 11 of 11) sorted by relevance

/frameworks/native/services/inputflinger/tests/
DInputReader_test.cpp4758 NotifyMotionArgs motionArgs; in TEST_F() local
4759 ASSERT_NO_FATAL_FAILURE(mFakeListener->assertNotifyMotionWasCalled(&motionArgs)); in TEST_F()
4760 ASSERT_EQ(ARBITRARY_TIME, motionArgs.eventTime); in TEST_F()
4761 ASSERT_EQ(DEVICE_ID, motionArgs.deviceId); in TEST_F()
4762 ASSERT_EQ(AINPUT_SOURCE_TOUCHSCREEN, motionArgs.source); in TEST_F()
4763 ASSERT_EQ(uint32_t(0), motionArgs.policyFlags); in TEST_F()
4764 ASSERT_EQ(AMOTION_EVENT_ACTION_DOWN, motionArgs.action); in TEST_F()
4765 ASSERT_EQ(0, motionArgs.flags); in TEST_F()
4766 ASSERT_EQ(AMETA_SHIFT_LEFT_ON | AMETA_SHIFT_ON, motionArgs.metaState); in TEST_F()
4767 ASSERT_EQ(0, motionArgs.buttonState); in TEST_F()
[all …]
DInputProcessorConverter_test.cpp40 NotifyMotionArgs motionArgs(/*sequenceNum=*/1, /*eventTime=*/downTime, /*readTime=*/2, in generateBasicMotionArgs() local
49 return motionArgs; in generateBasicMotionArgs()
63 const NotifyMotionArgs motionArgs = generateBasicMotionArgs(); in TEST() local
64 ASSERT_EQ(1, motionArgs.pointerCoords[0].getX()); in TEST()
65 ASSERT_EQ(2, motionArgs.pointerCoords[0].getY()); in TEST()
66 ASSERT_EQ(0.5, motionArgs.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_SIZE)); in TEST()
67 ASSERT_EQ(3U, BitSet64::count(motionArgs.pointerCoords[0].bits)); in TEST()
69 common::MotionEvent motionEvent = notifyMotionArgsToHalMotionEvent(motionArgs); in TEST()
72 motionArgs.pointerCoords[0].getX()); in TEST()
74 motionArgs.pointerCoords[0].getY()); in TEST()
[all …]
DInputProcessor_test.cpp46 NotifyMotionArgs motionArgs(/*sequenceNum=*/1, /*eventTime=*/downTime, /*readTime=*/2, in generateBasicMotionArgs() local
55 return motionArgs; in generateBasicMotionArgs()
96 NotifyMotionArgs motionArgs = generateBasicMotionArgs(); in TEST_F() local
97 mProcessor->notifyMotion(motionArgs); in TEST_F()
98 ASSERT_NO_FATAL_FAILURE(mTestListener.assertNotifyMotionWasCalled(testing::Eq(motionArgs))); in TEST_F()
195 NotifyMotionArgs motionArgs = generateBasicMotionArgs(); in TEST_F() local
199 ASSERT_NO_FATAL_FAILURE(mMotionClassifier->classify(motionArgs)); in TEST_F()
206 NotifyMotionArgs motionArgs = generateBasicMotionArgs(); in TEST_F() local
211 motionArgs.videoFrames = {frame}; in TEST_F()
215 ASSERT_NO_FATAL_FAILURE(mMotionClassifier->classify(motionArgs)); in TEST_F()
[all …]
DCursorInputMapper_test.cpp855 NotifyMotionArgs motionArgs; in TEST_F() local
866 motionArgs = std::get<NotifyMotionArgs>(args.front()); in TEST_F()
867 const float relX = motionArgs.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X); in TEST_F()
868 const float relY = motionArgs.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y); in TEST_F()
884 motionArgs = std::get<NotifyMotionArgs>(args.front()); in TEST_F()
885 const float relX2 = motionArgs.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X); in TEST_F()
886 const float relY2 = motionArgs.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y); in TEST_F()
930 NotifyMotionArgs motionArgs; in TEST_F() local
937 motionArgs = std::get<NotifyMotionArgs>(args.front()); in TEST_F()
938 const float relX = motionArgs.pointerCoords[0].getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X); in TEST_F()
[all …]
DUnwantedInteractionBlocker_test.cpp451 NotifyMotionArgs motionArgs = in TEST_F() local
453 mBlocker->notifyMotion(motionArgs); in TEST_F()
454 ASSERT_NO_FATAL_FAILURE(mTestListener.assertNotifyMotionWasCalled(testing::Eq(motionArgs))); in TEST_F()
DInputDispatcher_test.cpp7194 NotifyMotionArgs motionArgs = in TEST_F() local
7198 mDispatcher->notifyMotion(motionArgs); in TEST_F()
7202 motionArgs.action = AMOTION_EVENT_ACTION_MOVE; in TEST_F()
7203 motionArgs.id += 1; in TEST_F()
7204 motionArgs.eventTime = systemTime(SYSTEM_TIME_MONOTONIC); in TEST_F()
7205 motionArgs.pointerCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, in TEST_F()
7206 motionArgs.pointerCoords[0].getX() - 10); in TEST_F()
7208 mDispatcher->notifyMotion(motionArgs); in TEST_F()
7320 const NotifyMotionArgs motionArgs = in TEST_F() local
7323 mDispatcher->notifyMotion(motionArgs); in TEST_F()
[all …]
/frameworks/native/services/inputflinger/
DInputDeviceMetricsSource.cpp53 std::set<InputDeviceUsageSource> getUsageSourcesForMotionArgs(const NotifyMotionArgs& motionArgs) { in getUsageSourcesForMotionArgs() argument
54 LOG_ALWAYS_FATAL_IF(motionArgs.getPointerCount() < 1, "Received motion args without pointers"); in getUsageSourcesForMotionArgs()
57 for (uint32_t i = 0; i < motionArgs.getPointerCount(); i++) { in getUsageSourcesForMotionArgs()
58 const auto toolType = motionArgs.pointerProperties[i].toolType; in getUsageSourcesForMotionArgs()
59 if (isFromSource(motionArgs.source, AINPUT_SOURCE_MOUSE)) { in getUsageSourcesForMotionArgs()
73 if (isFromSource(motionArgs.source, AINPUT_SOURCE_MOUSE_RELATIVE) && in getUsageSourcesForMotionArgs()
78 if (isFromSource(motionArgs.source, AINPUT_SOURCE_TOUCHPAD) && in getUsageSourcesForMotionArgs()
83 if (isFromSource(motionArgs.source, AINPUT_SOURCE_BLUETOOTH_STYLUS) && in getUsageSourcesForMotionArgs()
88 if (isFromSource(motionArgs.source, AINPUT_SOURCE_STYLUS) && isStylusToolType(toolType)) { in getUsageSourcesForMotionArgs()
92 if (isFromSource(motionArgs.source, AINPUT_SOURCE_TOUCH_NAVIGATION)) { in getUsageSourcesForMotionArgs()
[all …]
DInputProcessor.cpp153 const NotifyMotionArgs& motionArgs = std::get<NotifyMotionArgs>(*args); in getDeviceId() local
154 return motionArgs.deviceId; in getDeviceId()
214 NotifyMotionArgs& motionArgs = std::get<NotifyMotionArgs>(*event.args); in processEvents() local
215 common::MotionEvent motionEvent = notifyMotionArgsToHalMotionEvent(motionArgs); in processEvents()
219 updateClassification(motionArgs.deviceId, motionArgs.eventTime, in processEvents()
/frameworks/native/services/inputflinger/benchmarks/
DInputDispatcher_benchmarks.cpp117 NotifyMotionArgs motionArgs = generateMotionArgs(); in benchmarkNotifyMotion() local
121 motionArgs.action = AMOTION_EVENT_ACTION_DOWN; in benchmarkNotifyMotion()
122 motionArgs.downTime = now(); in benchmarkNotifyMotion()
123 motionArgs.eventTime = motionArgs.downTime; in benchmarkNotifyMotion()
124 dispatcher->notifyMotion(motionArgs); in benchmarkNotifyMotion()
127 motionArgs.action = AMOTION_EVENT_ACTION_UP; in benchmarkNotifyMotion()
128 motionArgs.eventTime = now(); in benchmarkNotifyMotion()
129 dispatcher->notifyMotion(motionArgs); in benchmarkNotifyMotion()
/frameworks/native/services/inputflinger/tests/fuzzers/
DInputClassifierFuzzer.cpp85 const NotifyMotionArgs motionArgs = in LLVMFuzzerTestOneInput() local
88 notifyMotionArgsToHalMotionEvent(motionArgs); in LLVMFuzzerTestOneInput()
/frameworks/native/services/inputflinger/reader/
DInputReader.cpp63 bool isStylusPointerGestureStart(const NotifyMotionArgs& motionArgs) { in isStylusPointerGestureStart() argument
64 const auto actionMasked = MotionEvent::getActionMasked(motionArgs.action); in isStylusPointerGestureStart()
70 const auto actionIndex = MotionEvent::getActionIndex(motionArgs.action); in isStylusPointerGestureStart()
71 return isStylusToolType(motionArgs.pointerProperties[actionIndex].toolType); in isStylusPointerGestureStart()
217 const auto* motionArgs = std::get_if<NotifyMotionArgs>(&args); in loopOnce() local
218 if (motionArgs != nullptr && isStylusPointerGestureStart(*motionArgs)) { in loopOnce()
219 mPolicy->notifyStylusGestureStarted(motionArgs->deviceId, motionArgs->eventTime); in loopOnce()