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

Commit 347e5d49 authored by Jun Mukai's avatar Jun Mukai
Browse files

Introduce pointer capture API.

This depends on I4189eb4d93f50c2865b7a325727be5ceebcc71f8 of
frameworks/native.

Bug: 5452473
Change-Id: Ie21e521f3e5c581f976dc0feb5d84bfa48b046cd
parent 92e432c3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -40244,6 +40244,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
@@ -40779,6 +40781,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);
@@ -40905,6 +40908,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);
@@ -41005,6 +41009,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
@@ -42599,6 +42599,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
@@ -43134,6 +43136,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);
@@ -43260,6 +43263,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);
@@ -43360,6 +43364,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
@@ -40246,6 +40246,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
@@ -40781,6 +40783,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);
@@ -40907,6 +40910,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);
@@ -41007,6 +41011,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