Loading core/java/android/view/ViewRootImpl.java +25 −5 Original line number Diff line number Diff line Loading @@ -4818,11 +4818,8 @@ public final class ViewRootImpl implements ViewParent, protected int onProcess(QueuedInputEvent q) { if (q.mEvent instanceof KeyEvent) { return processKeyEvent(q); } else { final int source = q.mEvent.getSource(); if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) { return processPointerEvent(q); } } else if (q.mEvent instanceof MotionEvent) { return processMotionEvent(q); } return FORWARD; } Loading @@ -4846,6 +4843,23 @@ public final class ViewRootImpl implements ViewParent, return FORWARD; } private int processMotionEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent) q.mEvent; if (event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) { return processPointerEvent(q); } // If the motion event is from an absolute position device, exit touch mode final int action = event.getActionMasked(); if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_SCROLL) { if (event.isFromSource(InputDevice.SOURCE_CLASS_POSITION)) { ensureTouchMode(false); } } return FORWARD; } private int processPointerEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent)q.mEvent; Loading Loading @@ -5178,6 +5192,12 @@ public final class ViewRootImpl implements ViewParent, private int processGenericMotionEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent)q.mEvent; if (event.isFromSource(InputDevice.SOURCE_TOUCHPAD)) { if (hasPointerCapture() && mView.dispatchCapturedPointerEvent(event)) { return FINISH_HANDLED; } } // Deliver the event to the view. if (mView.dispatchGenericMotionEvent(event)) { return FINISH_HANDLED; Loading Loading
core/java/android/view/ViewRootImpl.java +25 −5 Original line number Diff line number Diff line Loading @@ -4818,11 +4818,8 @@ public final class ViewRootImpl implements ViewParent, protected int onProcess(QueuedInputEvent q) { if (q.mEvent instanceof KeyEvent) { return processKeyEvent(q); } else { final int source = q.mEvent.getSource(); if ((source & InputDevice.SOURCE_CLASS_POINTER) != 0) { return processPointerEvent(q); } } else if (q.mEvent instanceof MotionEvent) { return processMotionEvent(q); } return FORWARD; } Loading @@ -4846,6 +4843,23 @@ public final class ViewRootImpl implements ViewParent, return FORWARD; } private int processMotionEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent) q.mEvent; if (event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) { return processPointerEvent(q); } // If the motion event is from an absolute position device, exit touch mode final int action = event.getActionMasked(); if (action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_SCROLL) { if (event.isFromSource(InputDevice.SOURCE_CLASS_POSITION)) { ensureTouchMode(false); } } return FORWARD; } private int processPointerEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent)q.mEvent; Loading Loading @@ -5178,6 +5192,12 @@ public final class ViewRootImpl implements ViewParent, private int processGenericMotionEvent(QueuedInputEvent q) { final MotionEvent event = (MotionEvent)q.mEvent; if (event.isFromSource(InputDevice.SOURCE_TOUCHPAD)) { if (hasPointerCapture() && mView.dispatchCapturedPointerEvent(event)) { return FINISH_HANDLED; } } // Deliver the event to the view. if (mView.dispatchGenericMotionEvent(event)) { return FINISH_HANDLED; Loading