Loading services/java/com/android/server/wm/StackTapDetector.java +43 −39 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.wm; import android.graphics.Rect; import android.graphics.Region; import android.os.Looper; import android.view.DisplayInfo; Loading Loading @@ -52,6 +51,7 @@ public class StackTapDetector extends InputEventReceiver { @Override public void onInputEvent(InputEvent event) { try { if (!(event instanceof MotionEvent) || !event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) { return; Loading @@ -67,7 +67,8 @@ public class StackTapDetector extends InputEventReceiver { case MotionEvent.ACTION_MOVE: if (mPointerId >= 0) { int index = motionEvent.findPointerIndex(mPointerId); if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC || (motionEvent.getX(index) - mDownX) > mMotionSlop || (motionEvent.getY(index) - mDownY) > mMotionSlop) { mPointerId = -1; Loading @@ -87,8 +88,8 @@ public class StackTapDetector extends InputEventReceiver { < TAP_TIMEOUT_MSEC && (x - mDownX) < mMotionSlop && (y - mDownY) < mMotionSlop && !mTouchExcludeRegion.contains(x, y)) { mService.mH.obtainMessage(H.TAP_OUTSIDE_STACK, x, y, mDisplayContent) .sendToTarget(); mService.mH.obtainMessage(H.TAP_OUTSIDE_STACK, x, y, mDisplayContent).sendToTarget(); } } mPointerId = -1; Loading @@ -96,5 +97,8 @@ public class StackTapDetector extends InputEventReceiver { break; } } } finally { finishInputEvent(event, false /*ignored for monitors*/); } } } Loading
services/java/com/android/server/wm/StackTapDetector.java +43 −39 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.wm; import android.graphics.Rect; import android.graphics.Region; import android.os.Looper; import android.view.DisplayInfo; Loading Loading @@ -52,6 +51,7 @@ public class StackTapDetector extends InputEventReceiver { @Override public void onInputEvent(InputEvent event) { try { if (!(event instanceof MotionEvent) || !event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) { return; Loading @@ -67,7 +67,8 @@ public class StackTapDetector extends InputEventReceiver { case MotionEvent.ACTION_MOVE: if (mPointerId >= 0) { int index = motionEvent.findPointerIndex(mPointerId); if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC if ((motionEvent.getEventTime() - motionEvent.getDownTime()) > TAP_TIMEOUT_MSEC || (motionEvent.getX(index) - mDownX) > mMotionSlop || (motionEvent.getY(index) - mDownY) > mMotionSlop) { mPointerId = -1; Loading @@ -87,8 +88,8 @@ public class StackTapDetector extends InputEventReceiver { < TAP_TIMEOUT_MSEC && (x - mDownX) < mMotionSlop && (y - mDownY) < mMotionSlop && !mTouchExcludeRegion.contains(x, y)) { mService.mH.obtainMessage(H.TAP_OUTSIDE_STACK, x, y, mDisplayContent) .sendToTarget(); mService.mH.obtainMessage(H.TAP_OUTSIDE_STACK, x, y, mDisplayContent).sendToTarget(); } } mPointerId = -1; Loading @@ -96,5 +97,8 @@ public class StackTapDetector extends InputEventReceiver { break; } } } finally { finishInputEvent(event, false /*ignored for monitors*/); } } }