/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/ |
D | OtherActivityInputConsumer.java | 178 private void forceCancelGesture(MotionEvent ev) { in forceCancelGesture() argument 179 int action = ev.getAction(); in forceCancelGesture() 180 ev.setAction(ACTION_CANCEL); in forceCancelGesture() 181 finishTouchTracking(ev); in forceCancelGesture() 182 ev.setAction(action); in forceCancelGesture() 186 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 196 int action = ev.getAction(); in onMotionEvent() 197 ev.setAction(ACTION_MOVE_ALLOW_EASY_FLING); in onMotionEvent() 198 mRecentsViewDispatcher.dispatchEvent(ev); in onMotionEvent() 199 ev.setAction(action); in onMotionEvent() [all …]
|
D | AccessibilityInputConsumer.java | 76 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 78 mVelocityTracker.addMovement(ev); in onMotionEvent() 81 switch (ev.getActionMasked()) { in onMotionEvent() 87 int pointerIndex = ev.getActionIndex(); in onMotionEvent() 88 int pointerId = ev.getPointerId(pointerIndex); in onMotionEvent() 92 mTotalY += (ev.getY(pointerIndex) - mDownY); in onMotionEvent() 93 mDownY = ev.getY(newPointerIdx); in onMotionEvent() 94 mActivePointerId = ev.getPointerId(newPointerIdx); in onMotionEvent() 101 int pointerIndex = ev.getActionIndex(); in onMotionEvent() 102 if (mDeviceState.isInSwipeUpTouchRegion(ev, pointerIndex) in onMotionEvent() [all …]
|
D | OverscrollInputConsumer.java | 116 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 122 switch (ev.getActionMasked()) { in onMotionEvent() 125 mActivePointerId = ev.getPointerId(0); in onMotionEvent() 126 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 135 setActive(ev); in onMotionEvent() 146 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 147 int ptrId = ev.getPointerId(ptrIdx); in onMotionEvent() 151 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onMotionEvent() 152 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onMotionEvent() 153 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onMotionEvent() [all …]
|
D | AssistantInputConsumer.java | 124 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 126 switch (ev.getActionMasked()) { in onMotionEvent() 128 mActivePointerId = ev.getPointerId(0); in onMotionEvent() 129 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 141 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 142 int ptrId = ev.getPointerId(ptrIdx); in onMotionEvent() 146 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onMotionEvent() 147 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onMotionEvent() 148 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onMotionEvent() 149 mActivePointerId = ev.getPointerId(newPointerIdx); in onMotionEvent() [all …]
|
D | DeviceLockedInputConsumer.java | 134 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 138 mVelocityTracker.addMovement(ev); in onMotionEvent() 140 float x = ev.getX(); in onMotionEvent() 141 float y = ev.getY(); in onMotionEvent() 142 switch (ev.getAction()) { in onMotionEvent() 149 int ptrIdx = ev.getActionIndex(); in onMotionEvent() 150 if (!mDeviceState.isInSwipeUpTouchRegion(ev, ptrIdx)) { in onMotionEvent() 151 int action = ev.getAction(); in onMotionEvent() 152 ev.setAction(ACTION_CANCEL); in onMotionEvent() 153 finishTouchTracking(ev); in onMotionEvent() [all …]
|
D | OverviewInputConsumer.java | 77 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 78 int flags = ev.getEdgeFlags(); in onMotionEvent() 80 ev.setEdgeFlags(flags | Utilities.EDGE_NAV_BAR); in onMotionEvent() 82 ev.offsetLocation(-mLocationOnScreen[0], -mLocationOnScreen[1]); in onMotionEvent() 86 boolean handled = mTarget.proxyTouchEvent(ev, mStartingInActivityBounds); in onMotionEvent() 87 ev.offsetLocation(mLocationOnScreen[0], mLocationOnScreen[1]); in onMotionEvent() 88 ev.setEdgeFlags(flags); in onMotionEvent() 106 public void onKeyEvent(KeyEvent ev) { in onKeyEvent() argument 108 mActivity.dispatchKeyEvent(ev); in onKeyEvent()
|
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/ |
D | StatusBarTouchController.java | 87 private void dispatchTouchEvent(MotionEvent ev) { in dispatchTouchEvent() argument 89 mLastAction = ev.getActionMasked(); in dispatchTouchEvent() 90 mSystemUiProxy.onStatusBarMotionEvent(ev); in dispatchTouchEvent() 95 public final boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument 96 int action = ev.getActionMasked(); in onControllerInterceptTouchEvent() 97 int idx = ev.getActionIndex(); in onControllerInterceptTouchEvent() 98 int pid = ev.getPointerId(idx); in onControllerInterceptTouchEvent() 100 mCanIntercept = canInterceptTouch(ev); in onControllerInterceptTouchEvent() 104 mDownEvents.put(pid, new PointF(ev.getX(), ev.getY())); in onControllerInterceptTouchEvent() 105 } else if (ev.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN) { in onControllerInterceptTouchEvent() [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 | 154 public boolean isEventOverView(View view, MotionEvent ev) { in isEventOverView() argument 156 return mHitRect.contains((int) ev.getX(), (int) ev.getY()); in isEventOverView() 163 public boolean isEventOverView(View view, MotionEvent ev, View evView) { in isEventOverView() argument 164 int[] xy = new int[] {(int) ev.getX(), (int) ev.getY()}; in isEventOverView() 171 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 172 int action = ev.getAction(); in onInterceptTouchEvent() 182 return findActiveController(ev); in onInterceptTouchEvent() 185 private boolean isEventInLauncher(MotionEvent ev) { in isEventInLauncher() argument 186 final float x = ev.getX(); in isEventInLauncher() 187 final float y = ev.getY(); in isEventInLauncher() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/ |
D | EdgeBackGestureHandler.java | 162 private void cancelGesture(MotionEvent ev) { in cancelGesture() argument 165 MotionEvent cancelEv = MotionEvent.obtain(ev); in cancelGesture() 171 private void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 172 int action = ev.getActionMasked(); in onMotionEvent() 174 boolean isOnLeftEdge = ev.getX() <= mEdgeWidth + mLeftInset; in onMotionEvent() 176 mAllowGesture = isWithinTouchRegion((int) ev.getX(), (int) ev.getY()); in onMotionEvent() 177 mDownPoint.set(ev.getX(), ev.getY()); in onMotionEvent() 180 mEdgeBackPanel.onMotionEvent(ev); in onMotionEvent() 187 cancelGesture(ev); in onMotionEvent() 190 if ((ev.getEventTime() - ev.getDownTime()) > mLongPressTimeout) { in onMotionEvent() [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/dragndrop/ |
D | DragDriver.java | 48 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 55 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 96 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 173 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 174 mSecondaryEventConsumer.accept(ev); in onTouchEvent() 175 final int action = ev.getAction(); in onTouchEvent() 179 mEventListener.onDriverDragMove(ev.getX(), ev.getY()); in onTouchEvent() 182 mEventListener.onDriverDragMove(ev.getX(), ev.getY()); in onTouchEvent() 183 mEventListener.onDriverDragEnd(ev.getX(), ev.getY()); in onTouchEvent() 194 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/touch/ |
D | BaseSwipeDetector.java | 128 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 129 int actionMasked = ev.getActionMasked(); in onTouchEvent() 136 mVelocityTracker.addMovement(ev); in onTouchEvent() 140 mActivePointerId = ev.getPointerId(0); in onTouchEvent() 141 mDownPos.set(ev.getX(), ev.getY()); in onTouchEvent() 152 int ptrIdx = ev.getActionIndex(); in onTouchEvent() 153 int ptrId = ev.getPointerId(ptrIdx); in onTouchEvent() 157 ev.getX(newPointerIdx) - (mLastPos.x - mDownPos.x), in onTouchEvent() 158 ev.getY(newPointerIdx) - (mLastPos.y - mDownPos.y)); in onTouchEvent() 159 mLastPos.set(ev.getX(newPointerIdx), ev.getY(newPointerIdx)); in onTouchEvent() [all …]
|
D | WorkspaceTouchListener.java | 83 public boolean onTouch(View view, MotionEvent ev) { in onTouch() argument 84 mGestureDetector.onTouchEvent(ev); in onTouch() 86 int action = ev.getActionMasked(); in onTouch() 100 handleLongPress = mTempRect.contains((int) ev.getX(), (int) ev.getY()); in onTouch() 105 mTouchDownPoint.set(ev.getX(), ev.getY()); in onTouch() 108 mWorkspace.onTouchEvent(ev); in onTouch() 115 ev.setAction(ACTION_CANCEL); in onTouch() 116 mWorkspace.onTouchEvent(ev); in onTouch() 118 ev.setAction(action); in onTouch() 127 mWorkspace.onTouchEvent(ev); in onTouch() [all …]
|
/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/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/Launcher3/src/com/android/launcher3/ |
D | PagedView.java | 462 AccessibilityEvent ev = in sendScrollAccessibilityEvent() local 464 ev.setScrollable(true); in sendScrollAccessibilityEvent() 465 ev.setScrollX(getScrollX()); in sendScrollAccessibilityEvent() 466 ev.setScrollY(getScrollY()); in sendScrollAccessibilityEvent() 467 mOrientationHandler.setMaxScroll(ev, mMaxScroll); in sendScrollAccessibilityEvent() 468 sendAccessibilityEventUnchecked(ev); in sendScrollAccessibilityEvent() 872 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 882 acquireVelocityTrackerAndAddMovement(ev); in onInterceptTouchEvent() 889 final int action = ev.getAction(); in onInterceptTouchEvent() 901 determineScrollingStart(ev); in onInterceptTouchEvent() [all …]
|
/packages/apps/Launcher3/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ |
D | TriggerSwipeUpTouchTracker.java | 80 public void onMotionEvent(MotionEvent ev) { in onMotionEvent() argument 85 mVelocityTracker.addMovement(ev); in onMotionEvent() 86 switch (ev.getActionMasked()) { in onMotionEvent() 88 mDownPos.set(ev.getX(), ev.getY()); in onMotionEvent() 93 float displacementX = ev.getX() - mDownPos.x; in onMotionEvent() 94 float displacementY = ev.getY() - mDownPos.y; in onMotionEvent() 118 onGestureEnd(ev); in onMotionEvent() 132 private void onGestureEnd(MotionEvent ev) { in onGestureEnd() argument 147 float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); in onGestureEnd() 148 float displacementY = ev.getY() - mDownPos.y; in onGestureEnd()
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | MotionPauseDetector.java | 118 public void addPosition(MotionEvent ev) { in addPosition() argument 119 addPosition(ev, 0); in addPosition() 127 public void addPosition(MotionEvent ev, int pointerIndex) { in addPosition() argument 134 Float newVelocity = mVelocityProvider.addMotionEvent(ev, pointerIndex); in addPosition() 136 checkMotionPaused(newVelocity, mPreviousVelocity, ev.getEventTime()); in addPosition() 225 Float addMotionEvent(MotionEvent ev, int pointer); 245 public Float addMotionEvent(MotionEvent ev, int pointer) { 246 long time = ev.getEventTime(); 247 float position = ev.getAxisValue(mAxis, pointer); 306 public Float addMotionEvent(MotionEvent ev, int pointer) { [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/allapps/ |
D | WorkModeSwitch.java | 93 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 94 if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { in onTouchEvent() 95 mTouch[0] = ev.getX(); in onTouchEvent() 96 mTouch[1] = ev.getY(); in onTouchEvent() 97 } else if (ev.getActionMasked() == MotionEvent.ACTION_MOVE) { in onTouchEvent() 98 if (Math.abs(mTouch[0] - ev.getX()) > mTouchSlop in onTouchEvent() 99 || Math.abs(mTouch[1] - ev.getY()) > mTouchSlop) { in onTouchEvent() 100 int action = ev.getAction(); in onTouchEvent() 101 ev.setAction(MotionEvent.ACTION_CANCEL); in onTouchEvent() 102 super.onTouchEvent(ev); in onTouchEvent() [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 …]
|
/packages/apps/Launcher3/src/com/android/launcher3/popup/ |
D | PopupContainerWithArrow.java | 125 public boolean onInterceptTouchEvent(MotionEvent ev) { in onInterceptTouchEvent() argument 126 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onInterceptTouchEvent() 127 mInterceptTouchDown.set(ev.getX(), ev.getY()); in onInterceptTouchEvent() 130 && mNotificationItemView.onInterceptTouchEvent(ev)) { in onInterceptTouchEvent() 134 return squaredHypot(mInterceptTouchDown.x - ev.getX(), mInterceptTouchDown.y - ev.getY()) in onInterceptTouchEvent() 139 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 141 return mNotificationItemView.onTouchEvent(ev) || super.onTouchEvent(ev); in onTouchEvent() 143 return super.onTouchEvent(ev); in onTouchEvent() 174 public boolean onControllerInterceptTouchEvent(MotionEvent ev) { in onControllerInterceptTouchEvent() argument 175 if (ev.getAction() == MotionEvent.ACTION_DOWN) { in onControllerInterceptTouchEvent() [all …]
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/ |
D | InputConsumer.java | 93 default void onMotionEvent(MotionEvent ev) { } in onMotionEvent() argument 95 default void onKeyEvent(KeyEvent ev) { } in onKeyEvent() argument 97 default void onInputEvent(InputEvent ev) { in onInputEvent() argument 98 if (ev instanceof MotionEvent) { in onInputEvent() 99 onMotionEvent((MotionEvent) ev); in onInputEvent() 101 onKeyEvent((KeyEvent) ev); in onInputEvent()
|
D | RecentsAnimationController.java | 225 private boolean onInputConsumerEvent(InputEvent ev) { in onInputConsumerEvent() argument 226 if (ev instanceof MotionEvent) { in onInputConsumerEvent() 227 onInputConsumerMotionEvent((MotionEvent) ev); in onInputConsumerEvent() 228 } else if (ev instanceof KeyEvent) { in onInputConsumerEvent() 232 mInputConsumer.onKeyEvent((KeyEvent) ev); in onInputConsumerEvent() 238 private boolean onInputConsumerMotionEvent(MotionEvent ev) { in onInputConsumerMotionEvent() argument 239 int action = ev.getAction(); in onInputConsumerMotionEvent() 266 mInputConsumer.onMotionEvent(ev); in onInputConsumerMotionEvent()
|
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/baselayout/ |
D | ClickBlockingView.java | 54 public boolean onTouchEvent(MotionEvent ev) { in onTouchEvent() argument 62 final int action = ev.getActionMasked(); in onTouchEvent() 68 final boolean handled = super.onTouchEvent(ev); in onTouchEvent() 82 public boolean onHoverEvent(MotionEvent ev) { in onHoverEvent() argument 88 final int action = ev.getActionMasked(); in onHoverEvent() 94 final boolean handled = super.onHoverEvent(ev); in onHoverEvent()
|