Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56cd51a7 authored by Jun Mukai's avatar Jun Mukai Committed by Android (Google) Code Review
Browse files

Merge "Introduce pointer capture API."

parents ea5a9466 347e5d49
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -40259,6 +40259,8 @@ package android.view {
    field public static final int AXIS_LTRIGGER = 17; // 0x11
    field public static final int AXIS_ORIENTATION = 8; // 0x8
    field public static final int AXIS_PRESSURE = 2; // 0x2
    field public static final int AXIS_RELATIVE_X = 27; // 0x1b
    field public static final int AXIS_RELATIVE_Y = 28; // 0x1c
    field public static final int AXIS_RTRIGGER = 18; // 0x12
    field public static final int AXIS_RUDDER = 20; // 0x14
    field public static final int AXIS_RX = 12; // 0xc
@@ -40794,6 +40796,7 @@ package android.view {
    method public boolean hasNestedScrollingParent();
    method public boolean hasOnClickListeners();
    method public boolean hasOverlappingRendering();
    method public boolean hasPointerCapture();
    method public boolean hasTransientState();
    method public boolean hasWindowFocus();
    method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
@@ -40920,6 +40923,7 @@ package android.view {
    method public void postOnAnimation(java.lang.Runnable);
    method public void postOnAnimationDelayed(java.lang.Runnable, long);
    method public void refreshDrawableState();
    method public void releasePointerCapture();
    method public boolean removeCallbacks(java.lang.Runnable);
    method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
    method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
@@ -41020,6 +41024,7 @@ package android.view {
    method public void setPaddingRelative(int, int, int, int);
    method public void setPivotX(float);
    method public void setPivotY(float);
    method public void setPointerCapture();
    method public void setPointerIcon(android.view.PointerIcon);
    method public void setPressed(boolean);
    method public final void setRight(int);
+5 −0
Original line number Diff line number Diff line
@@ -42613,6 +42613,8 @@ package android.view {
    field public static final int AXIS_LTRIGGER = 17; // 0x11
    field public static final int AXIS_ORIENTATION = 8; // 0x8
    field public static final int AXIS_PRESSURE = 2; // 0x2
    field public static final int AXIS_RELATIVE_X = 27; // 0x1b
    field public static final int AXIS_RELATIVE_Y = 28; // 0x1c
    field public static final int AXIS_RTRIGGER = 18; // 0x12
    field public static final int AXIS_RUDDER = 20; // 0x14
    field public static final int AXIS_RX = 12; // 0xc
@@ -43148,6 +43150,7 @@ package android.view {
    method public boolean hasNestedScrollingParent();
    method public boolean hasOnClickListeners();
    method public boolean hasOverlappingRendering();
    method public boolean hasPointerCapture();
    method public boolean hasTransientState();
    method public boolean hasWindowFocus();
    method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
@@ -43274,6 +43277,7 @@ package android.view {
    method public void postOnAnimation(java.lang.Runnable);
    method public void postOnAnimationDelayed(java.lang.Runnable, long);
    method public void refreshDrawableState();
    method public void releasePointerCapture();
    method public boolean removeCallbacks(java.lang.Runnable);
    method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
    method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
@@ -43374,6 +43378,7 @@ package android.view {
    method public void setPaddingRelative(int, int, int, int);
    method public void setPivotX(float);
    method public void setPivotY(float);
    method public void setPointerCapture();
    method public void setPointerIcon(android.view.PointerIcon);
    method public void setPressed(boolean);
    method public final void setRight(int);
+5 −0
Original line number Diff line number Diff line
@@ -40261,6 +40261,8 @@ package android.view {
    field public static final int AXIS_LTRIGGER = 17; // 0x11
    field public static final int AXIS_ORIENTATION = 8; // 0x8
    field public static final int AXIS_PRESSURE = 2; // 0x2
    field public static final int AXIS_RELATIVE_X = 27; // 0x1b
    field public static final int AXIS_RELATIVE_Y = 28; // 0x1c
    field public static final int AXIS_RTRIGGER = 18; // 0x12
    field public static final int AXIS_RUDDER = 20; // 0x14
    field public static final int AXIS_RX = 12; // 0xc
@@ -40796,6 +40798,7 @@ package android.view {
    method public boolean hasNestedScrollingParent();
    method public boolean hasOnClickListeners();
    method public boolean hasOverlappingRendering();
    method public boolean hasPointerCapture();
    method public boolean hasTransientState();
    method public boolean hasWindowFocus();
    method public static android.view.View inflate(android.content.Context, int, android.view.ViewGroup);
@@ -40922,6 +40925,7 @@ package android.view {
    method public void postOnAnimation(java.lang.Runnable);
    method public void postOnAnimationDelayed(java.lang.Runnable, long);
    method public void refreshDrawableState();
    method public void releasePointerCapture();
    method public boolean removeCallbacks(java.lang.Runnable);
    method public void removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener);
    method public void removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener);
@@ -41022,6 +41026,7 @@ package android.view {
    method public void setPaddingRelative(int, int, int, int);
    method public void setPivotX(float);
    method public void setPivotY(float);
    method public void setPointerCapture();
    method public void setPointerIcon(android.view.PointerIcon);
    method public void setPressed(boolean);
    method public final void setRight(int);
+2 −0
Original line number Diff line number Diff line
@@ -73,4 +73,6 @@ interface IInputManager {

    void setPointerIconShape(int shapeId);
    void setCustomPointerIcon(in PointerIcon icon);

    void setPointerIconDetached(boolean detached);
}
+18 −0
Original line number Diff line number Diff line
@@ -829,6 +829,24 @@ public final class InputManager {
        }
    }

    /**
     * Update the pointer icon status. When detached, the pointer icon disappears, and further
     * mouse location will be stuck at the current point. Mouse movement events will still arrive,
     * and movement should be handled through {@link MotionEvent.AXIS_RELATIVE_X} and
     * {@link MotionEvent.AXIS_RELATIVE_Y}.
     *
     * @param detached true if the icon will be detached from the actual mouse movement.
     *
     * @hide
     */
    public void setPointerIconDetached(boolean detached) {
        try {
            mIm.setPointerIconDetached(detached);
        } catch (RemoteException ex) {
            // Do nothing.
        }
    }

    private void populateInputDevicesLocked() {
        if (mInputDevicesChangedListener == null) {
            final InputDevicesChangedListener listener = new InputDevicesChangedListener();
Loading