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

Commit 778e3b91 authored by Michael Wright's avatar Michael Wright
Browse files

DO NOT MERGE Remove Pointer Capture API

The underlying implementation needs to be completely rethought. If a
process crashed while you were in pointer capture mode, you were
pretty much stuck in it. If the mouse happened to move outside of
your bounds right before you called the API, you'd never actually get
an event (whatever it was hovering over would). There's no easy way
for the system to tell you when you enter or exit this mode because
it doesn't actually track who the current request is from.

These are all solvable, but not in the N time frame. Maybe next time.

Bug: 26830970
Change-Id: I03efd63c499b86dc278491ca3284566c1965581f
parent f9d9ce77
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -42390,7 +42390,6 @@ 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);
@@ -42520,7 +42519,6 @@ 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);
@@ -42531,7 +42529,6 @@ package android.view {
    method public boolean requestFocus(int, android.graphics.Rect);
    method public final boolean requestFocusFromTouch();
    method public void requestLayout();
    method public void requestPointerCapture();
    method public boolean requestRectangleOnScreen(android.graphics.Rect);
    method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
    method public final void requestUnbufferedDispatch(android.view.MotionEvent);
+0 −3
Original line number Diff line number Diff line
@@ -45384,7 +45384,6 @@ 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);
@@ -45514,7 +45513,6 @@ 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);
@@ -45525,7 +45523,6 @@ package android.view {
    method public boolean requestFocus(int, android.graphics.Rect);
    method public final boolean requestFocusFromTouch();
    method public void requestLayout();
    method public void requestPointerCapture();
    method public boolean requestRectangleOnScreen(android.graphics.Rect);
    method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
    method public final void requestUnbufferedDispatch(android.view.MotionEvent);
+0 −3
Original line number Diff line number Diff line
@@ -42468,7 +42468,6 @@ 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);
@@ -42598,7 +42597,6 @@ 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);
@@ -42609,7 +42607,6 @@ package android.view {
    method public boolean requestFocus(int, android.graphics.Rect);
    method public final boolean requestFocusFromTouch();
    method public void requestLayout();
    method public void requestPointerCapture();
    method public boolean requestRectangleOnScreen(android.graphics.Rect);
    method public boolean requestRectangleOnScreen(android.graphics.Rect, boolean);
    method public final void requestUnbufferedDispatch(android.view.MotionEvent);
+0 −2
Original line number Diff line number Diff line
@@ -81,6 +81,4 @@ interface IInputManager {

    void setPointerIconType(int typeId);
    void setCustomPointerIcon(in PointerIcon icon);

    void setPointerIconDetached(boolean detached);
}
+0 −18
Original line number Diff line number Diff line
@@ -893,24 +893,6 @@ 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) {
            throw ex.rethrowFromSystemServer();
        }
    }

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