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

Commit a26dd056 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

SyncPointerCapture (7/n): Clean up unused code from old Pointer Capture

After the pipeline changes to Pointer Capture, this CL cleans up the
following:
- The old way of notifying windows of Pointer Capture
(IWindow::dispatchPointerCaptureChanged) is removed.
- Tracking Pointer Capture in WindowManagerService is removed.

Bug: 141749603
Test: manual, flash crosshatch, pointer capture works.
Change-Id: I5bbcef42fe8d0d93a64a4a411b1d493fcb800f92
parent dd34a21b
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -129,11 +129,6 @@ oneway interface IWindow {
     */
    void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId);

    /**
     * Tell the window that it is either gaining or losing pointer capture.
     */
    void dispatchPointerCaptureChanged(boolean hasCapture);

    /**
     * Called when Scroll Capture support is requested for a window.
     *
+1 −9
Original line number Diff line number Diff line
@@ -8665,7 +8665,7 @@ public final class ViewRootImpl implements ViewParent,
                MSG_REQUEST_KEYBOARD_SHORTCUTS, deviceId, 0, receiver).sendToTarget();
    }

    public void dispatchPointerCaptureChanged(boolean on) {
    private void dispatchPointerCaptureChanged(boolean on) {
        final int what = MSG_POINTER_CAPTURE_CHANGED;
        mHandler.removeMessages(what);
        Message msg = mHandler.obtainMessage(what);
@@ -9437,14 +9437,6 @@ public final class ViewRootImpl implements ViewParent,
            }
        }

        @Override
        public void dispatchPointerCaptureChanged(boolean hasCapture) {
            final ViewRootImpl viewAncestor = mViewAncestor.get();
            if (viewAncestor != null) {
                viewAncestor.dispatchPointerCaptureChanged(hasCapture);
            }
        }

        @Override
        public void requestScrollCapture(IScrollCaptureCallbacks callbacks) {
            final ViewRootImpl viewAncestor = mViewAncestor.get();
+0 −4
Original line number Diff line number Diff line
@@ -157,10 +157,6 @@ public class BaseIWindow extends IWindow.Stub {
    public void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId) {
    }

    @Override
    public void dispatchPointerCaptureChanged(boolean hasCapture) {
    }

    @Override
    public void requestScrollCapture(IScrollCaptureCallbacks callbacks) {
        try {
+0 −3
Original line number Diff line number Diff line
@@ -338,9 +338,6 @@ public class SystemWindows {
        @Override
        public void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId) {}

        @Override
        public void dispatchPointerCaptureChanged(boolean hasCapture) {}

        @Override
        public void requestScrollCapture(IScrollCaptureCallbacks callbacks) {
            try {
+1 −10
Original line number Diff line number Diff line
@@ -2588,17 +2588,8 @@ public class InputManagerService extends IInputManager.Stub

        /**
         * Called when the focused window has changed.
         *
         * @return true if we want to request a configuration refresh.
         */
        boolean notifyFocusChanged(IBinder oldToken, IBinder newToken);

        /**
         * Called by the client to request pointer capture.
         *
         * @return true if we want to request a configuration refresh.
         */
        boolean requestPointerCapture(IBinder windowToken, boolean enabled);
        void notifyFocusChanged(IBinder oldToken, IBinder newToken);
    }

    /**
Loading