Add cursor position to synthesized events.
Synthesized events consist of injected, split and clamped events.
Instead of letting caller specify it, we fill cursor position fields by
deriving from pointers. Thus we can maintain the property between
pointer coodinates and cursor position. If there is need we can add a
new obtain method later as well anyway.
I decided to update the value for split events because it would be
unnatural to have a out of bound cursor position when a gesture crosses
view boundaries, but ultimately we probably shouldn't split mouse
events. Nevertheless that's out of the scope of this CL and I chose to
be on the safe side at this moment.
Bug: 134788085
Bug: 136607870
Test: atest TooltipTest#testMouseHoverTooltipWithHoverListener
Test: atest MotionEventTest (and select running all candidates)
Test: atest DragDropTest
Change-Id: I4f3dec0f3c4c1ab2ff5cb986b94b0e007d9fe41b
3 files changed