/packages/apps/Launcher3/src/com/android/launcher3/touch/ |
D | TouchEventTranslator.java | 78 DownState ev = new DownState(e.getEventTime(), e.getX(idx), e.getY(idx)); in setDownParameters() local 79 mDownEvents.append(idx, ev); in setDownParameters() 82 public void dispatchDownEvents(MotionEvent ev) { in dispatchDownEvents() argument 83 for(int i = 0; i < ev.getPointerCount() && i < mDownEvents.size(); i++) { in dispatchDownEvents() 84 int pid = ev.getPointerId(i); in dispatchDownEvents() 85 put(pid, i, ev.getX(i), 0, mDownEvents.get(i).timeStamp, ev); in dispatchDownEvents() 89 public void processMotionEvent(MotionEvent ev) { in processMotionEvent() argument 91 printSamples(TAG + " processMotionEvent", ev); in processMotionEvent() 93 int index = ev.getActionIndex(); in processMotionEvent() 94 float x = ev.getX(index); in processMotionEvent() [all …]
|
D | SwipeDetector.java | 70 abstract float getDisplacement(MotionEvent ev, int pointerIndex, PointF refPoint, in getDisplacement() argument 76 abstract float getActiveTouchSlop(MotionEvent ev, int pointerIndex, PointF downPos); in getActiveTouchSlop() argument 88 float getDisplacement(MotionEvent ev, int pointerIndex, PointF refPoint, boolean isRtl) { 89 return ev.getY(pointerIndex) - refPoint.y; 93 float getActiveTouchSlop(MotionEvent ev, int pointerIndex, PointF downPos) { 94 return Math.abs(ev.getX(pointerIndex) - downPos.x); 118 float getDisplacement(MotionEvent ev, int pointerIndex, PointF refPoint, boolean isRtl) { 119 float displacement = ev.getX(pointerIndex) - refPoint.x; 127 float getActiveTouchSlop(MotionEvent ev, int pointerIndex, PointF downPos) { 128 return Math.abs(ev.getY(pointerIndex) - downPos.y); [all …]
|
D | WorkspaceTouchListener.java | 82 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/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ |
D | OtherActivityInputConsumer.java | 175 private void forceCancelGesture(MotionEvent ev) { in forceCancelGesture() argument 176 int action = ev.getAction(); in forceCancelGesture() 177 ev.setAction(ACTION_CANCEL); in forceCancelGesture() 178 finishTouchTracking(ev); in forceCancelGesture() 179 ev.setAction(action); in forceCancelGesture() 183 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 194 int edgeFlags = ev.getEdgeFlags(); in onMotionEvent() 195 ev.setEdgeFlags(edgeFlags | EDGE_NAV_BAR); in onMotionEvent() 196 mRecentsViewDispatcher.dispatchEvent(ev); in onMotionEvent() 197 ev.setEdgeFlags(edgeFlags); in onMotionEvent() [all …]
|
D | FallbackNoButtonInputConsumer.java | 142 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 147 mVelocityTracker.addMovement(ev); in onMotionEvent() 148 if (ev.getActionMasked() == ACTION_POINTER_UP) { in onMotionEvent() 152 switch (ev.getActionMasked()) { in onMotionEvent() 154 mActivePointerId = ev.getPointerId(0); in onMotionEvent() 155 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 162 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 163 if (!mSwipeTouchRegion.contains(ev.getX(ptrIdx), ev.getY(ptrIdx))) { in onMotionEvent() 164 forceCancelGesture(ev); in onMotionEvent() 170 int ptrIdx = ev.getActionIndex(); in onMotionEvent() [all …]
|
D | AccessibilityInputConsumer.java | 80 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 …]
|
D | AssistantTouchConsumer.java | 118 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 120 mGestureDetector.onTouchEvent(ev); in onMotionEvent() 122 switch (ev.getActionMasked()) { in onMotionEvent() 124 mActivePointerId = ev.getPointerId(0); in onMotionEvent() 125 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 137 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 138 int ptrId = ev.getPointerId(ptrIdx); in onMotionEvent() 142 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onMotionEvent() 143 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onMotionEvent() 144 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onMotionEvent() [all …]
|
D | DeviceLockedInputConsumer.java | 122 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 126 mVelocityTracker.addMovement(ev); in onMotionEvent() 128 float x = ev.getX(); in onMotionEvent() 129 float y = ev.getY(); in onMotionEvent() 130 switch (ev.getAction()) { in onMotionEvent() 137 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 138 if (!mSwipeTouchRegion.contains(ev.getX(ptrIdx), ev.getY(ptrIdx))) { in onMotionEvent() 139 int action = ev.getAction(); in onMotionEvent() 140 ev.setAction(ACTION_CANCEL); in onMotionEvent() 141 finishTouchTracking(ev); in onMotionEvent() [all …]
|
D | OverviewWithoutFocusInputConsumer.java | 81 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 86 mVelocityTracker.addMovement(ev); in onMotionEvent() 87 switch (ev.getActionMasked()) { in onMotionEvent() 89 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 94 float displacementX = ev.getX() - mDownPos.x; in onMotionEvent() 95 float displacementY = ev.getY() - mDownPos.y; in onMotionEvent() 119 finishTouchTracking(ev); in onMotionEvent() 126 private void finishTouchTracking(MotionEvent ev) { in finishTouchTracking() argument 137 float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); in finishTouchTracking() 138 float displacementY = ev.getY() - mDownPos.y; in finishTouchTracking()
|
D | OverviewInputConsumer.java | 82 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 87 int flags = ev.getEdgeFlags(); in onMotionEvent() 89 ev.setEdgeFlags(flags | Utilities.EDGE_NAV_BAR); in onMotionEvent() 91 ev.offsetLocation(-mLocationOnScreen[0], -mLocationOnScreen[1]); in onMotionEvent() 92 boolean handled = mEventReceiver.test(ev); in onMotionEvent() 93 ev.offsetLocation(mLocationOnScreen[0], mLocationOnScreen[1]); in onMotionEvent() 94 ev.setEdgeFlags(flags); in onMotionEvent() 111 public void onKeyEvent(KeyEvent ev) { in onKeyEvent() argument 113 mActivity.dispatchKeyEvent(ev); in onKeyEvent()
|
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/ |
D | StatusBarTouchController.java | 59 mTranslator = new TouchEventTranslator((MotionEvent ev)-> dispatchTouchEvent(ev)); in StatusBarTouchController() 70 private void dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument 73 mLastAction = ev.getActionMasked(); in dispatchTouchEvent() 74 mSysUiProxy.onStatusBarMotionEvent(ev); in dispatchTouchEvent() 82 public final boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument 83 int action = ev.getActionMasked(); in onControllerInterceptTouchEvent() 85 mCanIntercept = canInterceptTouch(ev); in onControllerInterceptTouchEvent() 90 mTranslator.setDownParameters(0, ev); in onControllerInterceptTouchEvent() 91 } else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in onControllerInterceptTouchEvent() 93 mTranslator.setDownParameters(ev.getActionIndex(), ev); in onControllerInterceptTouchEvent() local [all …]
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | PhotoTouchListener.java | 67 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/views/ |
D | BaseDragLayer.java | 123 public boolean isEventOverView(View view, MotionEvent ev) { in isEventOverView() argument 125 return mHitRect.contains((int) ev.getX(), (int) ev.getY()); in isEventOverView() 132 public boolean isEventOverView(View view, MotionEvent ev, View evView) { in isEventOverView() argument 133 int[] xy = new int[] {(int) ev.getX(), (int) ev.getY()}; in isEventOverView() 140 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 141 int action = ev.getAction(); in onInterceptTouchEvent() 151 return findActiveController(ev); in onInterceptTouchEvent() 154 private TouchController findControllerToHandleTouch(MotionEvent ev) { in findControllerToHandleTouch() argument 155 if (shouldDisableGestures(ev)) return null; in findControllerToHandleTouch() 158 if (topView != null && topView.onControllerInterceptTouchEvent(ev)) { in findControllerToHandleTouch() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/ |
D | DragDriver.java | 47 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 48 final int action = ev.getAction(); in onTouchEvent() 52 mEventListener.onDriverDragMove(ev.getX(), ev.getY()); in onTouchEvent() 55 mEventListener.onDriverDragMove(ev.getX(), ev.getY()); in onTouchEvent() 56 mEventListener.onDriverDragEnd(ev.getX(), ev.getY()); in onTouchEvent() 69 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 70 final int action = ev.getAction(); in onInterceptTouchEvent() 74 mEventListener.onDriverDragEnd(ev.getX(), ev.getY()); in onInterceptTouchEvent() 107 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 112 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument
|
/packages/apps/Camera2/src/com/android/camera/ui/ |
D | ModeListView.java | 197 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 …]
|
D | MainActivityLayout.java | 77 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/ |
D | PagedView.java | 426 AccessibilityEvent ev = in sendScrollAccessibilityEvent() local 428 ev.setScrollable(true); in sendScrollAccessibilityEvent() 429 ev.setScrollX(getScrollX()); in sendScrollAccessibilityEvent() 430 ev.setScrollY(getScrollY()); in sendScrollAccessibilityEvent() 431 ev.setMaxScrollX(mMaxScrollX); in sendScrollAccessibilityEvent() 432 ev.setMaxScrollY(0); in sendScrollAccessibilityEvent() 434 sendAccessibilityEventUnchecked(ev); in sendScrollAccessibilityEvent() 842 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 850 if (getChildCount() <= 0 || shouldDisableGestures(ev)) return false; in onInterceptTouchEvent() 852 acquireVelocityTrackerAndAddMovement(ev); in onInterceptTouchEvent() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/ |
D | VerticalViewPager.java | 60 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/UnifiedEmail/src/com/android/mail/ui/ |
D | SwipeHelper.java | 202 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 203 final int action = ev.getAction(); in onInterceptTouchEvent() 206 mLastY = ev.getY(); in onInterceptTouchEvent() 208 View view = mCallback.getChildAtPosition(ev); in onInterceptTouchEvent() 216 mVelocityTracker.addMovement(ev); in onInterceptTouchEvent() 217 mInitialTouchPosX = ev.getX(); in onInterceptTouchEvent() 218 mInitialTouchPosY = ev.getY(); in onInterceptTouchEvent() 226 float currY = ev.getY(); in onInterceptTouchEvent() 227 float currX = ev.getX(); in onInterceptTouchEvent() 232 mLastY = ev.getY(); in onInterceptTouchEvent() [all …]
|
D | GmailDragHelper.java | 95 public boolean processTouchEvent(MotionEvent ev, int dragMode) { in processTouchEvent() argument 96 return processTouchEvent(ev, dragMode, null); in processTouchEvent() 104 public boolean processTouchEvent(MotionEvent ev, int dragMode, @Nullable Float xThreshold) { in processTouchEvent() argument 108 mVelocityTracker.addMovement(ev); in processTouchEvent() 110 switch (ev.getAction()) { in processTouchEvent() 112 mInitialInterceptedX = ev.getX(); in processTouchEvent() 113 mInitialInterceptedY = ev.getY(); in processTouchEvent() 117 mCallback.onDrag(ev.getX() - mStartDragX); in processTouchEvent() 120 final float evX = ev.getX(); in processTouchEvent() 139 final float deltaY = Math.abs(ev.getY() - mInitialInterceptedY); in processTouchEvent() [all …]
|
D | ConversationViewFrame.java | 59 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 62 if (!steal && ev.getActionMasked() == MotionEvent.ACTION_DOWN in onInterceptTouchEvent() 71 public boolean onTouchEvent(@NonNull MotionEvent ev) { in onTouchEvent() argument 73 switch (ev.getActionMasked()) { in onTouchEvent() 76 mInterceptedXDown = ev.getX(); in onTouchEvent() 77 mInterceptedYDown = ev.getY(); in onTouchEvent() 82 final float xDelta = ev.getX() - mInterceptedXDown; in onTouchEvent() 83 final float yDelta = ev.getY() - mInterceptedYDown; in onTouchEvent()
|
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ |
D | MessageScrollView.java | 126 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 128 LogUtils.d(LOG_TAG, "IN ScrollView.onIntercept, NOW stealing. ev=%s", ev); in onInterceptTouchEvent() 131 LogUtils.d(LOG_TAG, "IN ScrollView.onIntercept, already stealing. ev=%s", ev); in onInterceptTouchEvent() 135 mWantToIntercept = super.onInterceptTouchEvent(ev); in onInterceptTouchEvent() 136 LogUtils.d(LOG_TAG, "OUT ScrollView.onIntercept, steal=%s ev=%s", mWantToIntercept, ev); in onInterceptTouchEvent() 141 public boolean dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument 142 final int action = ev.getActionMasked(); in dispatchTouchEvent() 154 mScaleDetector.onTouchEvent(ev); in dispatchTouchEvent() 155 mGestureDetector.onTouchEvent(ev); in dispatchTouchEvent() 157 final boolean handled = super.dispatchTouchEvent(ev); in dispatchTouchEvent() [all …]
|
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/ |
D | RecentsAnimationWrapper.java | 158 private boolean onInputConsumerEvent(InputEvent ev) { in onInputConsumerEvent() argument 159 if (ev instanceof MotionEvent) { in onInputConsumerEvent() 160 onInputConsumerMotionEvent((MotionEvent) ev); in onInputConsumerEvent() 161 } else if (ev instanceof KeyEvent) { in onInputConsumerEvent() 165 mInputConsumer.onKeyEvent((KeyEvent) ev); in onInputConsumerEvent() 171 private boolean onInputConsumerMotionEvent(MotionEvent ev) { in onInputConsumerMotionEvent() argument 172 int action = ev.getAction(); in onInputConsumerMotionEvent() 187 int flags = ev.getEdgeFlags(); in onInputConsumerMotionEvent() 188 ev.setEdgeFlags(flags | FLAG_NO_GESTURES); in onInputConsumerMotionEvent() 189 mInputConsumer.onMotionEvent(ev); in onInputConsumerMotionEvent() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/popup/ |
D | PopupContainerWithArrow.java | 134 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 135 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent() 136 mInterceptTouchDown.set(ev.getX(), ev.getY()); in onInterceptTouchEvent() 139 && mNotificationItemView.onInterceptTouchEvent(ev)) { in onInterceptTouchEvent() 143 return squaredHypot(mInterceptTouchDown.x - ev.getX(), mInterceptTouchDown.y - ev.getY()) in onInterceptTouchEvent() 148 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 150 return mNotificationItemView.onTouchEvent(ev) || super.onTouchEvent(ev); in onTouchEvent() 152 return super.onTouchEvent(ev); in onTouchEvent() 176 public boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument 177 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onControllerInterceptTouchEvent() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/ |
D | MediaPickerPanel.java | 346 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 …]
|