Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java +8 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.view.MotionEvent.ACTION_UP; import android.annotation.NonNull; import android.graphics.PointF; import android.util.Log; import android.view.MotionEvent; import android.view.View; Loading @@ -43,6 +44,8 @@ import androidx.annotation.Nullable; * All touch events must be passed through this class to track a drag event. */ public class DragDetector { private static final String TAG = "DragDetector"; private final MotionEventHandler mEventHandler; private final PointF mInputDownPoint = new PointF(); Loading Loading @@ -109,8 +112,12 @@ public class DragDetector { return mResultOfDownAction; } final int dragPointerIndex = ev.findPointerIndex(mDragPointerId); // TODO(b/400635953): Separate the app header and its buttons' // touch listeners so they're not handled by the same DragDetector. if (dragPointerIndex == -1) { throw new IllegalStateException("Failed to find primary pointer!"); Log.w(TAG, "Invalid pointer index on ACTION_MOVE. Drag" + " pointer id: " + mDragPointerId); return mResultOfDownAction; } if (!mIsDragEvent) { float dx = ev.getRawX(dragPointerIndex) - mInputDownPoint.x; Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java +8 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import static android.view.MotionEvent.ACTION_UP; import android.annotation.NonNull; import android.graphics.PointF; import android.util.Log; import android.view.MotionEvent; import android.view.View; Loading @@ -43,6 +44,8 @@ import androidx.annotation.Nullable; * All touch events must be passed through this class to track a drag event. */ public class DragDetector { private static final String TAG = "DragDetector"; private final MotionEventHandler mEventHandler; private final PointF mInputDownPoint = new PointF(); Loading Loading @@ -109,8 +112,12 @@ public class DragDetector { return mResultOfDownAction; } final int dragPointerIndex = ev.findPointerIndex(mDragPointerId); // TODO(b/400635953): Separate the app header and its buttons' // touch listeners so they're not handled by the same DragDetector. if (dragPointerIndex == -1) { throw new IllegalStateException("Failed to find primary pointer!"); Log.w(TAG, "Invalid pointer index on ACTION_MOVE. Drag" + " pointer id: " + mDragPointerId); return mResultOfDownAction; } if (!mIsDragEvent) { float dx = ev.getRawX(dragPointerIndex) - mInputDownPoint.x; Loading