diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index a5c66537b11f0..29cc4b507accc 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -27953,10 +27953,26 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * Requests pointer capture mode. *
* When the window has pointer capture, the mouse pointer icon will disappear and will not - * change its position. Further mouse will be dispatched with the source - * {@link InputDevice#SOURCE_MOUSE_RELATIVE}, and relative position changes will be available - * through {@link MotionEvent#getX} and {@link MotionEvent#getY}. Non-mouse events - * (touchscreens, or stylus) will not be affected. + * change its position. Enabling pointer capture will change the behavior of input devices in + * the following ways: + *
+ * Events captured through pointer capture will be dispatched to + * {@link OnCapturedPointerListener#onCapturedPointer(View, MotionEvent)} if an + * {@link OnCapturedPointerListener} is set, and otherwise to + * {@link #onCapturedPointerEvent(MotionEvent)}. *
* If the window already has pointer capture, this call does nothing. *
@@ -27965,6 +27981,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * * @see #releasePointerCapture() * @see #hasPointerCapture() + * @see #onPointerCaptureChange(boolean) */ public void requestPointerCapture() { final ViewRootImpl viewRootImpl = getViewRootImpl(); @@ -27980,6 +27997,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * If the window does not have pointer capture, this call will do nothing. * @see #requestPointerCapture() * @see #hasPointerCapture() + * @see #onPointerCaptureChange(boolean) */ public void releasePointerCapture() { final ViewRootImpl viewRootImpl = getViewRootImpl();