Home
last modified time | relevance | path

Searched refs:rawEvent (Results 1 – 25 of 66) sorted by relevance

123

/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DGestureMatcher.java94 @State int state, MotionEvent event, MotionEvent rawEvent, int policyFlags) { in setState() argument
98 mListener.onStateChanged(mGestureId, mState, event, rawEvent, policyFlags); in setState()
103 protected final void startGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in startGesture() argument
104 setState(STATE_GESTURE_STARTED, event, rawEvent, policyFlags); in startGesture()
108 protected final void cancelGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in cancelGesture() argument
109 setState(STATE_GESTURE_CANCELED, event, rawEvent, policyFlags); in cancelGesture()
113 protected final void completeGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in completeGesture() argument
114 setState(STATE_GESTURE_COMPLETED, event, rawEvent, policyFlags); in completeGesture()
134 public final int onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
140 onDown(event, rawEvent, policyFlags); in onMotionEvent()
[all …]
DMultiTap.java64 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
65 cancelAfterTapTimeout(event, rawEvent, policyFlags); in onDown()
70 if (!isInsideSlop(rawEvent, mDoubleTapSlop)) { in onDown()
71 cancelGesture(event, rawEvent, policyFlags); in onDown()
80 startGesture(event, rawEvent, policyFlags); in onDown()
85 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
86 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
87 if (!isInsideSlop(rawEvent, mTouchSlop)) { in onUp()
88 cancelGesture(event, rawEvent, policyFlags); in onUp()
94 completeGesture(event, rawEvent, policyFlags); in onUp()
[all …]
DSecondFingerMultiTap.java65 protected void onPointerDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerDown() argument
67 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
73 cancelAfterTapTimeout(event, rawEvent, policyFlags); in onPointerDown()
78 if (!isSecondFingerInsideSlop(rawEvent, mDoubleTapSlop)) { in onPointerDown()
79 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
86 protected void onPointerUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerUp() argument
88 cancelGesture(event, rawEvent, policyFlags); in onPointerUp()
91 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onPointerUp()
92 if (!isSecondFingerInsideSlop(rawEvent, mTouchSlop)) { in onPointerUp()
93 cancelGesture(event, rawEvent, policyFlags); in onPointerUp()
[all …]
DMultiFingerSwipe.java122 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
124 cancelGesture(event, rawEvent, policyFlags); in onDown()
128 final int actionIndex = getActionIndex(rawEvent); in onDown()
129 final int pointerId = rawEvent.getPointerId(actionIndex); in onDown()
130 int pointerIndex = rawEvent.getPointerCount() - 1; in onDown()
133 cancelGesture(event, rawEvent, policyFlags); in onDown()
138 cancelGesture(event, rawEvent, policyFlags); in onDown()
143 final float x = rawEvent.getX(actionIndex); in onDown()
144 final float y = rawEvent.getY(actionIndex); in onDown()
146 cancelGesture(event, rawEvent, policyFlags); in onDown()
[all …]
DMultiFingerMultiTap.java93 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
97 cancelGesture(event, rawEvent, policyFlags); in onDown()
100 cancelAfterTapTimeout(event, rawEvent, policyFlags); in onDown()
103 initBaseLocation(rawEvent); in onDown()
109 final PointF nearest = findNearestPoint(rawEvent, mDoubleTapSlop, true); in onDown()
115 cancelGesture(event, rawEvent, policyFlags); in onDown()
120 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
121 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
123 final PointF nearest = findNearestPoint(rawEvent, mTouchSlop, false); in onUp()
136 startGesture(event, rawEvent, policyFlags); in onUp()
[all …]
DSwipe.java141 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
143 mBaseX = rawEvent.getX(); in onDown()
144 mBaseY = rawEvent.getY(); in onDown()
145 mBaseTime = rawEvent.getEventTime(); in onDown()
153 protected void onMove(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMove() argument
154 final float x = rawEvent.getX(); in onMove()
155 final float y = rawEvent.getY(); in onMove()
156 final long time = rawEvent.getEventTime(); in onMove()
177 cancelGesture(event, rawEvent, policyFlags); in onMove()
189 startGesture(event, rawEvent, policyFlags); in onMove()
[all …]
DTouchExplorer.java262 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
265 "event=" + event + ";rawEvent=" + rawEvent + ";policyFlags=" + policyFlags); in onMotionEvent()
268 super.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
273 checkForMalformedEvent(rawEvent); in onMotionEvent()
284 mState.onReceivedMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
286 if (mGestureDetector.onMotionEvent(event, rawEvent, policyFlags)) { in onMotionEvent()
300 handleMotionEventStateClear(event, rawEvent, policyFlags); in onMotionEvent()
302 handleMotionEventStateTouchInteracting(event, rawEvent, policyFlags); in onMotionEvent()
304 handleMotionEventStateTouchExploring(event, rawEvent, policyFlags); in onMotionEvent()
306 handleMotionEventStateDragging(event, rawEvent, policyFlags); in onMotionEvent()
[all …]
DMultiFingerMultiTapAndHold.java38 protected void onPointerDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerDown() argument
39 super.onPointerDown(event, rawEvent, policyFlags); in onPointerDown()
41 completeAfterLongPressTimeout(event, rawEvent, policyFlags); in onPointerDown()
46 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
49 cancelGesture(event, rawEvent, policyFlags); in onUp()
51 super.onUp(event, rawEvent, policyFlags); in onUp()
52 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
DMultiTapAndHold.java34 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
35 super.onDown(event, rawEvent, policyFlags); in onDown()
37 completeAfterLongPressTimeout(event, rawEvent, policyFlags); in onDown()
42 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
43 super.onUp(event, rawEvent, policyFlags); in onUp()
44 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
/frameworks/native/services/inputflinger/reader/mapper/accumulator/
DTouchButtonAccumulator.cpp72 void TouchButtonAccumulator::process(const RawEvent* rawEvent) { in process() argument
73 if (rawEvent->type == EV_KEY) { in process()
74 switch (rawEvent->code) { in process()
76 mBtnTouch = rawEvent->value; in process()
79 mBtnStylus = rawEvent->value; in process()
84 mBtnStylus2 = rawEvent->value; in process()
87 mBtnToolFinger = rawEvent->value; in process()
90 mBtnToolPen = rawEvent->value; in process()
93 mBtnToolRubber = rawEvent->value; in process()
96 mBtnToolBrush = rawEvent->value; in process()
[all …]
DSingleTouchMotionAccumulator.cpp48 void SingleTouchMotionAccumulator::process(const RawEvent* rawEvent) { in process() argument
49 if (rawEvent->type == EV_ABS) { in process()
50 switch (rawEvent->code) { in process()
52 mAbsX = rawEvent->value; in process()
55 mAbsY = rawEvent->value; in process()
58 mAbsPressure = rawEvent->value; in process()
61 mAbsToolWidth = rawEvent->value; in process()
64 mAbsDistance = rawEvent->value; in process()
67 mAbsTiltX = rawEvent->value; in process()
70 mAbsTiltY = rawEvent->value; in process()
DCursorButtonAccumulator.cpp50 void CursorButtonAccumulator::process(const RawEvent* rawEvent) { in process() argument
51 if (rawEvent->type == EV_KEY) { in process()
52 switch (rawEvent->code) { in process()
54 mBtnLeft = rawEvent->value; in process()
57 mBtnRight = rawEvent->value; in process()
60 mBtnMiddle = rawEvent->value; in process()
63 mBtnBack = rawEvent->value; in process()
66 mBtnSide = rawEvent->value; in process()
69 mBtnForward = rawEvent->value; in process()
72 mBtnExtra = rawEvent->value; in process()
[all …]
DCursorScrollAccumulator.cpp42 void CursorScrollAccumulator::process(const RawEvent* rawEvent) { in process() argument
43 if (rawEvent->type == EV_REL) { in process()
44 switch (rawEvent->code) { in process()
46 mRelWheel = rawEvent->value; in process()
49 mRelHWheel = rawEvent->value; in process()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/
DSimpleSwipe.java46 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
48 cancelAfter(mDetectionDurationMillis, event, rawEvent, policyFlags); in onDown()
52 protected void onPointerDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerDown() argument
53 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
57 protected void onMove(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMove() argument
58 if (gestureMatched(event, rawEvent, policyFlags)) { in onMove()
59 completeGesture(event, rawEvent, policyFlags); in onMove()
64 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
65 if (gestureMatched(event, rawEvent, policyFlags)) { in onUp()
66 completeGesture(event, rawEvent, policyFlags); in onUp()
[all …]
DTwoFingersDownOrSwipe.java52 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
54 cancelAfter(mDetectionDurationMillis, event, rawEvent, policyFlags); in onDown()
58 protected void onPointerDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerDown() argument
60 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
64 completeAfter(mDoubleTapTimeout, event, rawEvent, policyFlags); in onPointerDown()
66 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
71 protected void onMove(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMove() argument
76 completeGesture(event, rawEvent, policyFlags); in onMove()
81 completeGesture(event, rawEvent, policyFlags); in onMove()
86 protected void onPointerUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerUp() argument
[all …]
DGesturesObserver.java51 void onGestureCompleted(int gestureId, MotionEvent event, MotionEvent rawEvent, in onGestureCompleted() argument
62 void onGestureCancelled(MotionEvent event, MotionEvent rawEvent, int policyFlags); in onGestureCancelled() argument
89 public boolean onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
92 mListener.onGestureCancelled(event, rawEvent, policyFlags); in onMotionEvent()
102 matcher.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
127 MotionEvent rawEvent, int policyFlags) { in onStateChanged() argument
129 mListener.onGestureCompleted(gestureId, event, rawEvent, policyFlags); in onStateChanged()
140 mListener.onGestureCancelled(event, rawEvent, policyFlags); in onStateChanged()
DMagnificationGestureHandler.java103 public final void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
111 "event=" + event + ";rawEvent=" + rawEvent + ";policyFlags=" + policyFlags); in onMotionEvent()
117 dispatchTransformedEvent(event, rawEvent, policyFlags); in onMotionEvent()
119 onMotionEventInternal(event, rawEvent, policyFlags); in onMotionEvent()
138 final void dispatchTransformedEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in dispatchTransformedEvent() argument
142 super.onMotionEvent(event, rawEvent, policyFlags); in dispatchTransformedEvent()
151 super.onMotionEvent(event, rawEvent, policyFlags); in dispatchTransformedEvent()
165 abstract void onMotionEventInternal(MotionEvent event, MotionEvent rawEvent, int policyFlags); in onMotionEventInternal() argument
DMagnificationGesturesObserver.java110 boolean onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
114 cacheDelayedMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
122 return mGesturesObserver.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
126 public void onGestureCompleted(int gestureId, MotionEvent event, MotionEvent rawEvent, in onGestureCompleted() argument
140 public void onGestureCancelled(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onGestureCancelled() argument
181 private void cacheDelayedMotionEvent(MotionEvent event, MotionEvent rawEvent, in cacheDelayedMotionEvent() argument
185 MotionEventInfo.obtain(event, rawEvent, in cacheDelayedMotionEvent()
DMotionEventInfo.java34 static MotionEventInfo obtain(MotionEvent event, MotionEvent rawEvent, in obtain() argument
36 return new MotionEventInfo(MotionEvent.obtain(event), MotionEvent.obtain(rawEvent), in obtain()
40 MotionEventInfo(MotionEvent event, MotionEvent rawEvent, in MotionEventInfo() argument
43 mRawEvent = rawEvent; in MotionEventInfo()
DFullScreenMagnificationGestureHandler.java177 void onMotionEventInternal(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEventInternal() argument
178 handleEventWith(mCurrentState, event, rawEvent, policyFlags); in onMotionEventInternal()
182 MotionEvent event, MotionEvent rawEvent, int policyFlags) { in handleEventWith() argument
188 stateHandler.onMotionEvent(event, rawEvent, policyFlags); in handleEventWith()
289 void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) in onMotionEvent() argument
334 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
448 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) in onMotionEvent() argument
512 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
537 dispatchTransformedEvent(event, rawEvent, policyFlags); in onMotionEvent()
605 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
[all …]
/frameworks/native/services/inputflinger/reader/mapper/
DMultiTouchInputMapper.cpp82 void MultiTouchMotionAccumulator::process(const RawEvent* rawEvent) { in process() argument
83 if (rawEvent->type == EV_ABS) { in process()
86 if (rawEvent->code == ABS_MT_SLOT) { in process()
87 mCurrentSlot = rawEvent->value; in process()
111 switch (rawEvent->code) { in process()
113 slot->mAbsMTPositionX = rawEvent->value; in process()
114 warnIfNotInUse(*rawEvent, *slot); in process()
117 slot->mAbsMTPositionY = rawEvent->value; in process()
118 warnIfNotInUse(*rawEvent, *slot); in process()
121 slot->mAbsMTTouchMajor = rawEvent->value; in process()
[all …]
DSwitchInputMapper.cpp32 void SwitchInputMapper::process(const RawEvent* rawEvent) { in process() argument
33 switch (rawEvent->type) { in process()
35 processSwitch(rawEvent->code, rawEvent->value); in process()
39 if (rawEvent->code == SYN_REPORT) { in process()
40 sync(rawEvent->when); in process()
DExternalStylusInputMapper.cpp59 void ExternalStylusInputMapper::process(const RawEvent* rawEvent) { in process() argument
60 mSingleTouchMotionAccumulator.process(rawEvent); in process()
61 mTouchButtonAccumulator.process(rawEvent); in process()
63 if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) { in process()
64 sync(rawEvent->when); in process()
DRotaryEncoderInputMapper.cpp86 void RotaryEncoderInputMapper::process(const RawEvent* rawEvent) { in process() argument
87 mRotaryEncoderScrollAccumulator.process(rawEvent); in process()
89 if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) { in process()
90 sync(rawEvent->when, rawEvent->readTime); in process()
DJoystickInputMapper.cpp259 void JoystickInputMapper::process(const RawEvent* rawEvent) { in process() argument
260 switch (rawEvent->type) { in process()
262 auto it = mAxes.find(rawEvent->code); in process()
268 newValue = (axis.rawAxisInfo.maxValue - rawEvent->value) * axis.scale + in process()
273 if (rawEvent->value < axis.axisInfo.splitValue) { in process()
274 newValue = (axis.axisInfo.splitValue - rawEvent->value) * axis.scale + in process()
277 } else if (rawEvent->value > axis.axisInfo.splitValue) { in process()
280 (rawEvent->value - axis.axisInfo.splitValue) * axis.highScale + in process()
288 newValue = rawEvent->value * axis.scale + axis.offset; in process()
299 switch (rawEvent->code) { in process()
[all …]

123