Home
last modified time | relevance | path

Searched refs:motionEvent (Results 1 – 25 of 88) sorted by relevance

1234

/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/
DMenuListViewTouchHandler.java56 @NonNull MotionEvent motionEvent) { in onInterceptTouchEvent() argument
59 addMovement(motionEvent); in onInterceptTouchEvent()
61 final float dx = motionEvent.getRawX() - mDown.x; in onInterceptTouchEvent()
62 final float dy = motionEvent.getRawY() - mDown.y; in onInterceptTouchEvent()
64 switch (motionEvent.getAction()) { in onInterceptTouchEvent()
68 mDown.set(motionEvent.getRawX(), motionEvent.getRawY()); in onInterceptTouchEvent()
72 mDragToInteractAnimationController.maybeConsumeDownMotionEvent(motionEvent); in onInterceptTouchEvent()
84 if (mDragToInteractAnimationController.maybeConsumeMoveMotionEvent(motionEvent) in onInterceptTouchEvent()
105 if (mDragToInteractAnimationController.maybeConsumeUpMotionEvent(motionEvent) in onInterceptTouchEvent()
127 @NonNull MotionEvent motionEvent) { in onTouchEvent() argument
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DVerifiedMotionEventTest.kt65 val motionEvent = createVerifiedMotionEvent() in testParcelUnparcel() constant
67 motionEvent.writeToParcel(parcel, 0 /*flags*/) in testParcelUnparcel()
73 compareVerifiedMotionEvents(motionEvent, unparceledMotionEvent) in testParcelUnparcel()
81 val motionEvent = createVerifiedMotionEvent() in testParcelInputEvent() constant
82 val inputEvent: VerifiedInputEvent = motionEvent in testParcelInputEvent()
91 compareVerifiedMotionEvents(motionEvent, unparceledEvent as VerifiedMotionEvent) in testParcelInputEvent()
99 val motionEvent = createVerifiedMotionEvent() in testParcelMotionEvent() constant
101 motionEvent.writeToParcel(parcel, 0 /*flags*/) in testParcelMotionEvent()
108 compareVerifiedMotionEvents(motionEvent, unparceledEvent as VerifiedMotionEvent) in testParcelMotionEvent()
116 val motionEvent = createVerifiedMotionEvent() in testParcelInputToMotionEvent() constant
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DFalsingDataProvider.java100 void onMotionEvent(MotionEvent motionEvent) { in onMotionEvent() argument
101 List<MotionEvent> motionEvents = unpackMotionEvent(motionEvent); in onMotionEvent()
110 if (motionEvent.getActionMasked() == MotionEvent.ACTION_DOWN) { in onMotionEvent()
118 mDropLastEvent = shouldDropEvent(motionEvent); in onMotionEvent()
128 mMotionEventListeners.forEach(listener -> listener.onMotionEvent(motionEvent)); in onMotionEvent()
348 private List<MotionEvent> unpackMotionEvent(MotionEvent motionEvent) {
351 int pointerCount = motionEvent.getPointerCount();
354 motionEvent.getPointerProperties(i, pointerProperties);
361 int historySize = motionEvent.getHistorySize();
366 motionEvent.getHistoricalPointerCoords(j, i, pointerCoords);
[all …]
DPointerCountClassifier.java46 public void onTouchEvent(MotionEvent motionEvent) { in onTouchEvent() argument
48 if (motionEvent.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent()
49 mMaxPointerCount = motionEvent.getPointerCount(); in onTouchEvent()
51 mMaxPointerCount = Math.max(mMaxPointerCount, motionEvent.getPointerCount()); in onTouchEvent()
DProximityClassifier.java79 public void onTouchEvent(MotionEvent motionEvent) { in onTouchEvent() argument
80 int action = motionEvent.getActionMasked(); in onTouchEvent()
83 mGestureStartTimeNs = motionEvent.getEventTimeNanos(); in onTouchEvent()
87 mPrevNearTimeNs = motionEvent.getEventTimeNanos(); in onTouchEvent()
94 update(mNear, motionEvent.getEventTimeNanos()); in onTouchEvent()
95 long duration = motionEvent.getEventTimeNanos() - mGestureStartTimeNs; in onTouchEvent()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/
DBubblesNavBarMotionEventHandler.java65 public boolean onMotionEvent(MotionEvent motionEvent) { in onMotionEvent() argument
66 float dx = motionEvent.getX() - mTouchDown.x; in onMotionEvent()
67 float dy = motionEvent.getY() - mTouchDown.y; in onMotionEvent()
69 switch (motionEvent.getAction()) { in onMotionEvent()
71 if (isInGestureRegion(motionEvent)) { in onMotionEvent()
72 mTouchDown.set(motionEvent.getX(), motionEvent.getY()); in onMotionEvent()
73 mMotionEventListener.onDown(motionEvent.getX(), motionEvent.getY()); in onMotionEvent()
85 getVelocityTracker().addMovement(motionEvent); in onMotionEvent()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/temporarydisplay/chipbar/
DSwipeChipbarAwayGestureHandlerTest.kt54 val motionEvent = createMotionEvent(y = VIEW_BOTTOM - 100f) in <lambda>() constant
55 assertThat(underTest.startOfGestureIsWithinBounds(motionEvent)).isTrue() in <lambda>()
64 val motionEvent = createMotionEvent(y = VIEW_BOTTOM + 20f) in <lambda>() constant
65 assertThat(underTest.startOfGestureIsWithinBounds(motionEvent)).isTrue() in <lambda>()
74 val motionEvent = createMotionEvent(y = VIEW_BOTTOM * 4f) in <lambda>() constant
75 assertThat(underTest.startOfGestureIsWithinBounds(motionEvent)).isFalse() in <lambda>()
84 val motionEvent = createMotionEvent(y = VIEW_BOTTOM - 100f) in <lambda>() constant
85 assertThat(underTest.startOfGestureIsWithinBounds(motionEvent)).isTrue() in <lambda>()
88 assertThat(underTest.startOfGestureIsWithinBounds(motionEvent)).isFalse() in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/
DKeyguardSettingsButtonOnTouchListener.kt32 override fun onTouch(view: View, motionEvent: MotionEvent): Boolean { in onTouch()
33 when (motionEvent.actionMasked) { in onTouch()
36 downPositionDisplayCoords.set(motionEvent.rawX, motionEvent.rawY) in onTouch()
42 motionEvent.rawDistanceFrom( in onTouch()
/frameworks/native/libs/input/tests/
DInputPublisherAndConsumer_test.cpp124 void verifyArgsEqualToEvent(const PublishMotionArgs& args, const MotionEvent& motionEvent) { in verifyArgsEqualToEvent() argument
125 EXPECT_EQ(args.eventId, motionEvent.getId()); in verifyArgsEqualToEvent()
126 EXPECT_EQ(args.deviceId, motionEvent.getDeviceId()); in verifyArgsEqualToEvent()
127 EXPECT_EQ(args.source, motionEvent.getSource()); in verifyArgsEqualToEvent()
128 EXPECT_EQ(args.displayId, motionEvent.getDisplayId()); in verifyArgsEqualToEvent()
129 EXPECT_EQ(args.hmac, motionEvent.getHmac()); in verifyArgsEqualToEvent()
130 EXPECT_EQ(args.action, motionEvent.getAction()); in verifyArgsEqualToEvent()
131 EXPECT_EQ(args.downTime, motionEvent.getDownTime()); in verifyArgsEqualToEvent()
132 EXPECT_EQ(args.flags, motionEvent.getFlags()); in verifyArgsEqualToEvent()
133 EXPECT_EQ(args.edgeFlags, motionEvent.getEdgeFlags()); in verifyArgsEqualToEvent()
[all …]
DInputPublisherAndConsumerNoResampling_test.cpp131 void verifyArgsEqualToEvent(const PublishMotionArgs& args, const MotionEvent& motionEvent) { in verifyArgsEqualToEvent() argument
132 EXPECT_EQ(args.eventId, motionEvent.getId()); in verifyArgsEqualToEvent()
133 EXPECT_EQ(args.deviceId, motionEvent.getDeviceId()); in verifyArgsEqualToEvent()
134 EXPECT_EQ(args.source, motionEvent.getSource()); in verifyArgsEqualToEvent()
135 EXPECT_EQ(args.displayId, motionEvent.getDisplayId()); in verifyArgsEqualToEvent()
136 EXPECT_EQ(args.hmac, motionEvent.getHmac()); in verifyArgsEqualToEvent()
137 EXPECT_EQ(args.action, motionEvent.getAction()); in verifyArgsEqualToEvent()
138 EXPECT_EQ(args.downTime, motionEvent.getDownTime()); in verifyArgsEqualToEvent()
139 EXPECT_EQ(args.flags, motionEvent.getFlags()); in verifyArgsEqualToEvent()
140 EXPECT_EQ(args.edgeFlags, motionEvent.getEdgeFlags()); in verifyArgsEqualToEvent()
[all …]
DTouchResampling_test.cpp172 MotionEvent* motionEvent = static_cast<MotionEvent*>(event); in consumeInputEventEntries() local
174 ASSERT_EQ(entries.size() - 1, motionEvent->getHistorySize()); in consumeInputEventEntries()
178 ASSERT_EQ(entry.action, motionEvent->getAction()); in consumeInputEventEntries()
179 ASSERT_EQ(entry.eventTime.count(), motionEvent->getHistoricalEventTime(i)); in consumeInputEventEntries()
180 ASSERT_EQ(entry.pointers.size(), motionEvent->getPointerCount()); in consumeInputEventEntries()
182 for (size_t p = 0; p < motionEvent->getPointerCount(); p++) { in consumeInputEventEntries()
185 ssize_t motionEventPointerIndex = motionEvent->findPointerIndex(entry.pointers[p].id); in consumeInputEventEntries()
188 motionEvent->getHistoricalAxisValue(AMOTION_EVENT_AXIS_X, in consumeInputEventEntries()
191 motionEvent->getHistoricalRawAxisValue(AMOTION_EVENT_AXIS_X, in consumeInputEventEntries()
194 motionEvent->getHistoricalAxisValue(AMOTION_EVENT_AXIS_Y, in consumeInputEventEntries()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/
DPointerCountClassifierTest.java73 MotionEvent motionEvent = MotionEvent.obtain( in testFail_multiPointer() local
77 mClassifier.onTouchEvent(motionEvent); in testFail_multiPointer()
78 motionEvent.recycle(); in testFail_multiPointer()
90 MotionEvent motionEvent = MotionEvent.obtain( in testPass_multiPointerDragDown() local
94 mClassifier.onTouchEvent(motionEvent); in testPass_multiPointerDragDown()
95 motionEvent.recycle(); in testPass_multiPointerDragDown()
DProximityClassifierTest.java138 MotionEvent motionEvent = MotionEvent.obtain(1, 1, MotionEvent.ACTION_DOWN, 0, 0, 0); in touchDown() local
139 mClassifier.onTouchEvent(motionEvent); in touchDown()
140 motionEvent.recycle(); in touchDown()
144 MotionEvent motionEvent = MotionEvent.obtain(1, 1 + duration, MotionEvent.ACTION_UP, 0, in touchUp() local
147 mClassifier.onTouchEvent(motionEvent); in touchUp()
149 motionEvent.recycle(); in touchUp()
DClassifierTest.java77 for (MotionEvent motionEvent : mMotionEvents) { in resetDataProvider()
78 motionEvent.recycle(); in resetDataProvider()
126 MotionEvent motionEvent = MotionEvent.obtain(1, eventTime, actionType, x, y, in appendMotionEvent() local
128 mMotionEvents.add(motionEvent); in appendMotionEvent()
130 mDataProvider.onMotionEvent(motionEvent); in appendMotionEvent()
132 return motionEvent; in appendMotionEvent()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/biometrics/
DUdfpsShellTest.kt54 @Captor private lateinit var motionEvent: ArgumentCaptor<MotionEvent> variable in com.android.systemui.biometrics.UdfpsShellTest
70 verify(udfpsOverlayController, times(2)).debugOnTouch(motionEvent.capture()) in testSimFingerDown()
72 assertEquals(motionEvent.allValues[0].action, MotionEvent.ACTION_DOWN) // ACTION_MOVE in testSimFingerDown()
73 assertEquals(motionEvent.allValues[1].action, MotionEvent.ACTION_MOVE) // ACTION_MOVE in testSimFingerDown()
80 verify(udfpsOverlayController).debugOnTouch(motionEvent.capture()) in testSimFingerUp()
82 assertEquals(motionEvent.value.action, MotionEvent.ACTION_UP) in testSimFingerUp()
/frameworks/native/services/inputflinger/tests/
DInputProcessorConverter_test.cpp69 common::MotionEvent motionEvent = notifyMotionArgsToHalMotionEvent(motionArgs); in TEST() local
71 ASSERT_EQ(getMotionEventAxis(motionEvent.pointerCoords[0], common::Axis::X), in TEST()
73 ASSERT_EQ(getMotionEventAxis(motionEvent.pointerCoords[0], common::Axis::Y), in TEST()
75 ASSERT_EQ(getMotionEventAxis(motionEvent.pointerCoords[0], common::Axis::SIZE), in TEST()
78 BitSet64::count(motionEvent.pointerCoords[0].bits)); in TEST()
DFakeWindows.cpp107 const MotionEvent& motionEvent = static_cast<const MotionEvent&>(*event); in consumeEvent() local
108 ASSERT_THAT(motionEvent, WithMotionAction(expectedAction)); in consumeEvent()
110 EXPECT_EQ(expectedFlags.value(), motionEvent.getFlags()); in consumeEvent()
145 std::unique_ptr<MotionEvent> motionEvent = consumeMotion(); in consumeMotionEvent() local
146 ASSERT_NE(nullptr, motionEvent) << "Did not get a motion event, but expected " << matcher; in consumeMotionEvent()
147 ASSERT_THAT(*motionEvent, matcher); in consumeMotionEvent()
210 MotionEvent& motionEvent = static_cast<MotionEvent&>(*event); in assertNoEvents() local
211 ADD_FAILURE() << "Received motion event " << motionEvent; in assertNoEvents()
310 std::unique_ptr<MotionEvent> motionEvent = in consumeMotionEvent() local
312 if (motionEvent == nullptr) { in consumeMotionEvent()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DDragInputEventReceiver.java65 final MotionEvent motionEvent = (MotionEvent) event; in onInputEvent() local
66 final float newX = motionEvent.getRawX(); in onInputEvent()
67 final float newY = motionEvent.getRawY(); in onInputEvent()
69 (motionEvent.getButtonState() & BUTTON_STYLUS_PRIMARY) != 0; in onInputEvent()
78 switch (motionEvent.getAction()) { in onInputEvent()
/frameworks/base/tests/Input/src/com/android/test/input/
DPointerEventDispatcherTest.kt33 override fun onPointerEvent(motionEvent: MotionEvent) { in <lambda>()
78 val motionEvent = MotionEvent.obtain(downTime, downTime, in testSendMotionToCrashingListenerDoesNotCrash() constant
80 motionEvent.source = InputDevice.SOURCE_TOUCHSCREEN in testSendMotionToCrashingListenerDoesNotCrash()
82 mSender.sendInputEvent(seq, motionEvent) in testSendMotionToCrashingListenerDoesNotCrash()
/frameworks/base/core/java/android/view/
DInputEventAssigner.java66 MotionEvent motionEvent = (MotionEvent) event; in processEvent() local
67 if (motionEvent.isFromSource(SOURCE_TOUCHSCREEN)) { in processEvent()
68 final int action = motionEvent.getActionMasked(); in processEvent()
DHandwritingInitiator.java171 public boolean onTouchEvent(@NonNull MotionEvent motionEvent) { in onTouchEvent() argument
172 final int maskedAction = motionEvent.getActionMasked(); in onTouchEvent()
177 if (!motionEvent.isStylusPointer()) { in onTouchEvent()
181 mState = new State(motionEvent); in onTouchEvent()
184 final int pointerId = motionEvent.getPointerId(motionEvent.getActionIndex()); in onTouchEvent()
215 motionEvent.getEventTime() - mState.mStylusDownTimeInMillis; in onTouchEvent()
221 final int pointerIndex = motionEvent.findPointerIndex(mState.mStylusPointerId); in onTouchEvent()
222 final float x = motionEvent.getX(pointerIndex); in onTouchEvent()
223 final float y = motionEvent.getY(pointerIndex); in onTouchEvent()
246 motionEvent.setAction((motionEvent.getAction() in onTouchEvent()
[all …]
/frameworks/base/apct-tests/perftests/core/src/android/input/
DVelocityTrackerBenchmarkTest.kt77 val motionEvent = MotionEvent.obtain( in createMotionEvent() constant
96 return motionEvent in createMotionEvent()
116 val motionEvent = MotionEvent.obtain( in createMotionEvent() constant
132 return motionEvent in createMotionEvent()
203 val motionEvent = motionState.createMotionEvent() in testAddMovement() constant
205 velocityTracker.addMovement(motionEvent) in testAddMovement()
/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/complication/
DHideComplicationTouchHandler.java139 final MotionEvent motionEvent = (MotionEvent) ev; in onSessionStart()
141 if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) { in onSessionStart()
145 .checkWithinTouchRegion(Math.round(motionEvent.getX()), in onSessionStart()
146 Math.round(motionEvent.getY())); in onSessionStart()
165 } else if (motionEvent.getAction() == MotionEvent.ACTION_CANCEL in onSessionStart()
166 || motionEvent.getAction() == MotionEvent.ACTION_UP) { in onSessionStart()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/
DWindowMagnificationGestureHandler.java525 public boolean shouldStopDetection(MotionEvent motionEvent) { in shouldStopDetection() argument
535 MotionEvent motionEvent) { in onGestureCompleted() argument
545 .pointersInWindow(mDisplayId, motionEvent) > 0) { in onGestureCompleted()
548 onTripleTap(motionEvent); in onGestureCompleted()
550 onTripleTapAndHold(motionEvent); in onGestureCompleted()
554 changeToDelegateStateIfNeed(motionEvent); in onGestureCompleted()
561 MotionEvent motionEvent) { in onGestureCancelled() argument
568 changeToDelegateStateIfNeed(motionEvent); in onGestureCancelled()
571 private void changeToDelegateStateIfNeed(MotionEvent motionEvent) { in changeToDelegateStateIfNeed() argument
572 if (motionEvent != null && (motionEvent.getActionMasked() == ACTION_UP in changeToDelegateStateIfNeed()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/settings/brightness/
DBrightnessSliderControllerTest.kt65 private lateinit var motionEvent: MotionEvent variable in com.android.systemui.settings.brightness.BrightnessSliderControllerTest
88 whenever(motionEvent.copy()).thenReturn(motionEvent) in setUp()
186 mController.mirrorTouchEvent(motionEvent) in testMirrorEventWithMirror()
188 verify(mirror).mirrorTouchEvent(motionEvent) in testMirrorEventWithMirror()
194 mController.mirrorTouchEvent(motionEvent) in testMirrorEventWithoutMirror_dispatchToView()
196 verify(brightnessSliderView).dispatchTouchEvent(motionEvent) in testMirrorEventWithoutMirror_dispatchToView()

1234