Home
last modified time | relevance | path

Searched refs:ev (Results 1 – 25 of 133) sorted by relevance

123456

/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/
DOtherActivityInputConsumer.java165 private void forceCancelGesture(MotionEvent ev) { in forceCancelGesture() argument
166 int action = ev.getAction(); in forceCancelGesture()
167 ev.setAction(ACTION_CANCEL); in forceCancelGesture()
168 finishTouchTracking(ev); in forceCancelGesture()
169 ev.setAction(action); in forceCancelGesture()
173 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
184 int edgeFlags = ev.getEdgeFlags(); in onMotionEvent()
185 ev.setEdgeFlags(edgeFlags | EDGE_NAV_BAR); in onMotionEvent()
186 mRecentsViewDispatcher.dispatchEvent(ev); in onMotionEvent()
187 ev.setEdgeFlags(edgeFlags); in onMotionEvent()
[all …]
DAccessibilityInputConsumer.java80 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
82 mVelocityTracker.addMovement(ev); in onMotionEvent()
85 switch (ev.getActionMasked()) { in onMotionEvent()
91 int pointerIndex = ev.getActionIndex(); in onMotionEvent()
92 int pointerId = ev.getPointerId(pointerIndex); in onMotionEvent()
96 mTotalY += (ev.getY(pointerIndex) - mDownY); in onMotionEvent()
97 mDownY = ev.getY(newPointerIdx); in onMotionEvent()
98 mActivePointerId = ev.getPointerId(newPointerIdx); in onMotionEvent()
105 int pointerIndex = ev.getActionIndex(); in onMotionEvent()
106 if (mSwipeTouchRegion.contains(ev.getX(pointerIndex), ev.getY(pointerIndex)) in onMotionEvent()
[all …]
DAssistantTouchConsumer.java123 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
125 switch (ev.getActionMasked()) { in onMotionEvent()
127 mActivePointerId = ev.getPointerId(0); in onMotionEvent()
128 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent()
140 int ptrIdx = ev.getActionIndex(); in onMotionEvent()
141 int ptrId = ev.getPointerId(ptrIdx); in onMotionEvent()
145 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onMotionEvent()
146 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onMotionEvent()
147 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onMotionEvent()
148 mActivePointerId = ev.getPointerId(newPointerIdx); in onMotionEvent()
[all …]
DDeviceLockedInputConsumer.java124 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
128 mVelocityTracker.addMovement(ev); in onMotionEvent()
130 float x = ev.getX(); in onMotionEvent()
131 float y = ev.getY(); in onMotionEvent()
132 switch (ev.getAction()) { in onMotionEvent()
139 int ptrIdx = ev.getActionIndex(); in onMotionEvent()
140 if (!mSwipeTouchRegion.contains(ev.getX(ptrIdx), ev.getY(ptrIdx))) { in onMotionEvent()
141 int action = ev.getAction(); in onMotionEvent()
142 ev.setAction(ACTION_CANCEL); in onMotionEvent()
143 finishTouchTracking(ev); in onMotionEvent()
[all …]
DOverviewWithoutFocusInputConsumer.java84 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
89 mVelocityTracker.addMovement(ev); in onMotionEvent()
90 switch (ev.getActionMasked()) { in onMotionEvent()
92 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent()
97 float displacementX = ev.getX() - mDownPos.x; in onMotionEvent()
98 float displacementY = ev.getY() - mDownPos.y; in onMotionEvent()
122 finishTouchTracking(ev); in onMotionEvent()
129 private void finishTouchTracking(MotionEvent ev) { in finishTouchTracking() argument
141 float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); in finishTouchTracking()
142 float displacementY = ev.getY() - mDownPos.y; in finishTouchTracking()
DOverviewInputConsumer.java84 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument
89 int flags = ev.getEdgeFlags(); in onMotionEvent()
91 ev.setEdgeFlags(flags | Utilities.EDGE_NAV_BAR); in onMotionEvent()
93 ev.offsetLocation(-mLocationOnScreen[0], -mLocationOnScreen[1]); in onMotionEvent()
94 boolean handled = mEventReceiver.test(ev); in onMotionEvent()
95 ev.offsetLocation(mLocationOnScreen[0], mLocationOnScreen[1]); in onMotionEvent()
96 ev.setEdgeFlags(flags); in onMotionEvent()
113 public void onKeyEvent(KeyEvent ev) { in onKeyEvent() argument
115 mActivity.dispatchKeyEvent(ev); in onKeyEvent()
DInputConsumer.java69 default void onMotionEvent(MotionEvent ev) { } in onMotionEvent() argument
71 default void onKeyEvent(KeyEvent ev) { } in onKeyEvent() argument
73 default void onInputEvent(InputEvent ev) { in onInputEvent() argument
74 if (ev instanceof MotionEvent) { in onInputEvent()
75 onMotionEvent((MotionEvent) ev); in onInputEvent()
77 onKeyEvent((KeyEvent) ev); in onInputEvent()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/
DStatusBarTouchController.java88 private void dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument
91 mLastAction = ev.getActionMasked(); in dispatchTouchEvent()
92 mSysUiProxy.onStatusBarMotionEvent(ev); in dispatchTouchEvent()
100 public final boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument
101 int action = ev.getActionMasked(); in onControllerInterceptTouchEvent()
102 int idx = ev.getActionIndex(); in onControllerInterceptTouchEvent()
103 int pid = ev.getPointerId(idx); in onControllerInterceptTouchEvent()
105 mCanIntercept = canInterceptTouch(ev); in onControllerInterceptTouchEvent()
109 mDownEvents.put(pid, new PointF(ev.getX(), ev.getY())); in onControllerInterceptTouchEvent()
110 } else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in onControllerInterceptTouchEvent()
[all …]
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
DPhotoTouchListener.java67 private float getAngle(View target, MotionEvent ev) { in getAngle() argument
69 int a = ev.findPointerIndex(mA); in getAngle()
70 int b = ev.findPointerIndex(mB); in getAngle()
122 public boolean onTouch(View target, MotionEvent ev) { in onTouch() argument
123 final int action = ev.getActionMasked(); in onTouch()
126 for(int i = 0; i < 10 && i < ev.getPointerCount(); i++) { in onTouch()
127 pts[i*2] = ev.getX(i); in onTouch()
128 pts[i*2 + 1] = ev.getY(i); in onTouch()
135 mInitialTouchTime = ev.getEventTime(); in onTouch()
136 mA = ev.getPointerId(ev.getActionIndex()); in onTouch()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DBaseSwipeDetector.java120 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
121 int actionMasked = ev.getActionMasked(); in onTouchEvent()
128 mVelocityTracker.addMovement(ev); in onTouchEvent()
132 mActivePointerId = ev.getPointerId(0); in onTouchEvent()
133 mDownPos.set(ev.getX(), ev.getY()); in onTouchEvent()
144 int ptrIdx = ev.getActionIndex(); in onTouchEvent()
145 int ptrId = ev.getPointerId(ptrIdx); in onTouchEvent()
149 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onTouchEvent()
150 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onTouchEvent()
151 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onTouchEvent()
[all …]
DWorkspaceTouchListener.java82 public boolean onTouch(View view, MotionEvent ev) { in onTouch() argument
83 mGestureDetector.onTouchEvent(ev); in onTouch()
85 int action = ev.getActionMasked(); in onTouch()
99 handleLongPress = mTempRect.contains((int) ev.getX(), (int) ev.getY()); in onTouch()
104 mTouchDownPoint.set(ev.getX(), ev.getY()); in onTouch()
107 mWorkspace.onTouchEvent(ev); in onTouch()
114 ev.setAction(ACTION_CANCEL); in onTouch()
115 mWorkspace.onTouchEvent(ev); in onTouch()
117 ev.setAction(action); in onTouch()
126 mWorkspace.onTouchEvent(ev); in onTouch()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/views/
DBaseDragLayer.java144 public boolean isEventOverView(View view, MotionEvent ev) { in isEventOverView() argument
146 return mHitRect.contains((int) ev.getX(), (int) ev.getY()); in isEventOverView()
153 public boolean isEventOverView(View view, MotionEvent ev, View evView) { in isEventOverView() argument
154 int[] xy = new int[] {(int) ev.getX(), (int) ev.getY()}; in isEventOverView()
161 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
162 int action = ev.getAction(); in onInterceptTouchEvent()
172 return findActiveController(ev); in onInterceptTouchEvent()
175 private TouchController findControllerToHandleTouch(MotionEvent ev) { in findControllerToHandleTouch() argument
177 if (topView != null && topView.onControllerInterceptTouchEvent(ev)) { in findControllerToHandleTouch()
182 if (controller.onControllerInterceptTouchEvent(ev)) { in findControllerToHandleTouch()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/
DDragDriver.java49 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
50 final int action = ev.getAction(); in onTouchEvent()
54 mEventListener.onDriverDragMove(ev.getX(), ev.getY()); in onTouchEvent()
60 mEventListener.onDriverDragMove(ev.getX(), ev.getY()); in onTouchEvent()
61 mEventListener.onDriverDragEnd(ev.getX(), ev.getY()); in onTouchEvent()
77 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
78 final int action = ev.getAction(); in onInterceptTouchEvent()
82 mEventListener.onDriverDragEnd(ev.getX(), ev.getY()); in onInterceptTouchEvent()
115 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
120 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
DDragController.java427 public boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument
433 mFlingToDeleteHelper.recordMotionEvent(ev); in onControllerInterceptTouchEvent()
435 final int action = ev.getAction(); in onControllerInterceptTouchEvent()
436 final int[] dragLayerPos = getClampedDragLayerPos(ev.getX(), ev.getY()); in onControllerInterceptTouchEvent()
442 mLastTouchClassification = ev.getClassification(); in onControllerInterceptTouchEvent()
456 return mDragDriver != null && mDragDriver.onInterceptTouchEvent(ev); in onControllerInterceptTouchEvent()
544 public boolean onControllerTouchEvent(MotionEvent ev) { in onControllerTouchEvent() argument
550 mFlingToDeleteHelper.recordMotionEvent(ev); in onControllerTouchEvent()
552 final int action = ev.getAction(); in onControllerTouchEvent()
553 final int[] dragLayerPos = getClampedDragLayerPos(ev.getX(), ev.getY()); in onControllerTouchEvent()
[all …]
/packages/apps/Camera2/src/com/android/camera/ui/
DModeListView.java197 public boolean shouldHandleTouchEvent(MotionEvent ev) { in shouldHandleTouchEvent() argument
209 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
349 public boolean shouldHandleTouchEvent(MotionEvent ev) { in shouldHandleTouchEvent() argument
354 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
355 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent()
356 mFocusItem = getFocusItem(ev.getX(), ev.getY()); in onTouchEvent()
447 public boolean shouldHandleTouchEvent(MotionEvent ev) { in shouldHandleTouchEvent() argument
455 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
456 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent()
462 if (isTouchInsideList(ev)) { in onTouchEvent()
[all …]
DMainActivityLayout.java77 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
78 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent()
80 mDown = MotionEvent.obtain(ev); in onInterceptTouchEvent()
88 } else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in onInterceptTouchEvent()
97 if (ev.getEventTime() - ev.getDownTime() > SWIPE_TIME_OUT) { in onInterceptTouchEvent()
103 int deltaX = (int) (ev.getX() - mDown.getX()); in onInterceptTouchEvent()
104 int deltaY = (int) (ev.getY() - mDown.getY()); in onInterceptTouchEvent()
105 if (ev.getActionMasked() == MotionEvent.ACTION_MOVE in onInterceptTouchEvent()
125 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
128 return mTouchReceiver.dispatchTouchEvent(ev); in onTouchEvent()
/packages/apps/Launcher3/src/com/android/launcher3/
DPagedView.java427 AccessibilityEvent ev = in sendScrollAccessibilityEvent() local
429 ev.setScrollable(true); in sendScrollAccessibilityEvent()
430 ev.setScrollX(getScrollX()); in sendScrollAccessibilityEvent()
431 ev.setScrollY(getScrollY()); in sendScrollAccessibilityEvent()
432 ev.setMaxScrollX(mMaxScrollX); in sendScrollAccessibilityEvent()
433 ev.setMaxScrollY(0); in sendScrollAccessibilityEvent()
435 sendAccessibilityEventUnchecked(ev); in sendScrollAccessibilityEvent()
843 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
853 acquireVelocityTrackerAndAddMovement(ev); in onInterceptTouchEvent()
860 final int action = ev.getAction(); in onInterceptTouchEvent()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/
DVerticalViewPager.java60 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
61 final boolean toIntercept = super.onInterceptTouchEvent(flipXY(ev)); in onInterceptTouchEvent()
63 flipXY(ev); in onInterceptTouchEvent()
68 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
69 final boolean toHandle = super.onTouchEvent(flipXY(ev)); in onTouchEvent()
71 flipXY(ev); in onTouchEvent()
75 private MotionEvent flipXY(MotionEvent ev) { in flipXY() argument
79 final float x = (ev.getY() / height) * width; in flipXY()
80 final float y = (ev.getX() / width) * height; in flipXY()
82 ev.setLocation(x, y); in flipXY()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/popup/
DPopupContainerWithArrow.java133 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
134 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent()
135 mInterceptTouchDown.set(ev.getX(), ev.getY()); in onInterceptTouchEvent()
138 && mNotificationItemView.onInterceptTouchEvent(ev)) { in onInterceptTouchEvent()
142 return squaredHypot(mInterceptTouchDown.x - ev.getX(), mInterceptTouchDown.y - ev.getY()) in onInterceptTouchEvent()
147 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
149 return mNotificationItemView.onTouchEvent(ev) || super.onTouchEvent(ev); in onTouchEvent()
151 return super.onTouchEvent(ev); in onTouchEvent()
178 public boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument
179 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onControllerInterceptTouchEvent()
[all …]
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/
DMediaPickerPanel.java346 public boolean onInterceptTouchEvent(final MotionEvent ev) { in onInterceptTouchEvent() argument
347 return mTouchHandler.onInterceptTouchEvent(ev) || super.onInterceptTouchEvent(ev); in onInterceptTouchEvent()
413 public boolean onInterceptTouchEvent(final MotionEvent ev) { in onInterceptTouchEvent() argument
414 switch (ev.getActionMasked()) { in onInterceptTouchEvent()
418 mTouchHandler.onTouch(MediaPickerPanel.this, ev); in onInterceptTouchEvent()
428 if (shouldAllowRecaptureTouch(ev)) { in onInterceptTouchEvent()
451 mTouchHandler.onTouch(MediaPickerPanel.this, ev); in onInterceptTouchEvent()
465 private boolean shouldAllowRecaptureTouch(MotionEvent ev) { in shouldAllowRecaptureTouch() argument
466 final long elapsedMs = ev.getEventTime() - ev.getDownTime(); in shouldAllowRecaptureTouch()
472 final float dx = ev.getRawX() - mDownEvent.getRawX(); in shouldAllowRecaptureTouch()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/logging/
DUserEventDispatcher.java450 public void dispatchUserEvent(LauncherEvent ev, Intent intent) { in dispatchUserEvent() argument
455 ev.elapsedContainerMillis = SystemClock.uptimeMillis() - mElapsedContainerMillis; in dispatchUserEvent()
456 ev.elapsedSessionMillis = SystemClock.uptimeMillis() - mElapsedSessionMillis; in dispatchUserEvent()
460 Log.d(TAG, generateLog(ev)); in dispatchUserEvent()
466 public static String generateLog(LauncherEvent ev) { in generateLog() argument
468 + "\naction:" + LoggerUtils.getActionStr(ev.action); in generateLog()
469 if (ev.srcTarget != null && ev.srcTarget.length > 0) { in generateLog()
470 log += "\n Source " + getTargetsStr(ev.srcTarget); in generateLog()
472 if (ev.destTarget != null && ev.destTarget.length > 0) { in generateLog()
473 log += "\n Destination " + getTargetsStr(ev.destTarget); in generateLog()
[all …]
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/
DRecentsAnimationWrapper.java171 private boolean onInputConsumerEvent(InputEvent ev) { in onInputConsumerEvent() argument
172 if (ev instanceof MotionEvent) { in onInputConsumerEvent()
173 onInputConsumerMotionEvent((MotionEvent) ev); in onInputConsumerEvent()
174 } else if (ev instanceof KeyEvent) { in onInputConsumerEvent()
178 mInputConsumer.onKeyEvent((KeyEvent) ev); in onInputConsumerEvent()
184 private boolean onInputConsumerMotionEvent(MotionEvent ev) { in onInputConsumerMotionEvent() argument
185 int action = ev.getAction(); in onInputConsumerMotionEvent()
212 mInputConsumer.onMotionEvent(ev); in onInputConsumerMotionEvent()
/packages/apps/Launcher3/src/com/android/launcher3/widget/
DLauncherAppWidgetHostView.java157 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
160 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent()
172 if (mStylusEventHelper.onMotionEvent(ev)) { in onInterceptTouchEvent()
177 switch (ev.getAction()) { in onInterceptTouchEvent()
196 if (!Utilities.pointInView(this, ev.getX(), ev.getY(), mSlop)) { in onInterceptTouchEvent()
206 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
209 switch (ev.getAction()) { in onTouchEvent()
215 if (!Utilities.pointInView(this, ev.getX(), ev.getY(), mSlop)) { in onTouchEvent()
/packages/apps/Gallery2/src/com/android/photos/views/
DGalleryThumbnailView.java280 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
281 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent()
282 final int action = ev.getAction() & MotionEventCompat.ACTION_MASK; in onInterceptTouchEvent()
287 mLastTouchX = ev.getX(); in onInterceptTouchEvent()
288 mActivePointerId = MotionEventCompat.getPointerId(ev, 0); in onInterceptTouchEvent()
298 final int index = MotionEventCompat.findPointerIndex(ev, mActivePointerId); in onInterceptTouchEvent()
305 final float x = MotionEventCompat.getX(ev, index); in onInterceptTouchEvent()
321 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
322 mVelocityTracker.addMovement(ev); in onTouchEvent()
323 final int action = ev.getAction() & MotionEventCompat.ACTION_MASK; in onTouchEvent()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/allapps/
DAllAppsContainerView.java178 public boolean shouldContainerScroll(MotionEvent ev) { in shouldContainerScroll() argument
181 if (mLauncher.getDragLayer().isEventOverView(mSearchContainer, ev)) { in shouldContainerScroll()
189 mLauncher.getDragLayer().isEventOverView(rv.getScrollbar(), ev)) { in shouldContainerScroll()
192 return rv.shouldContainerScroll(ev, mLauncher.getDragLayer()); in shouldContainerScroll()
196 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
205 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent()
208 rv.getScrollbar().isHitInParent(ev.getX(), ev.getY(), mFastScrollerOffset)) { in onInterceptTouchEvent()
215 return mTouchHandler.handleTouchEvent(ev, mFastScrollerOffset); in onInterceptTouchEvent()
221 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument
222 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onTouchEvent()
[all …]

123456