Refresh pointer icons locally from ViewRootImpl

The previous pipeline for refreshing pointer icon from a View would
call into WindowManagerService, which would look up the cursor position
and call back into the app to updatePointerIcon(x, y). This
implmenetation requires WM to know the cursor position, and adds
unnecessary binder roundtrips.

When PointerChoreographer is enabled, we will store the last input event
used to resolve the pointer icon locally in the app, and will use that
whenever we need to force the pointer icon to resolve. We can do this
because the hit test in InputDispatcher will verify that the pointer is
indeed being sent to the app before allowing the icon to be changed.

Bug: 293587049
Test: manual with test app that calls View#setPointerIcon every second,
observe that the icon changes without needing to generate new events.

Change-Id: I5344fe7023d0caaff001215c4195947f94d24ae6
2 files changed