Track existing pointers on the virtual touchscreen.
The way we write touch input events use to be stateless, when an action UP events on a pointer is received, we convert it to a BTN_TOUCH UP event with that pointer id. However, in multi-touch protocol, an BTN up is only sent when there's no pointers in touch whereas the lift of a single pointer is marked by setting tracking id to -1. This change added a map from the touchscreen to its existing touches, so that we only send the BTN up when the corresponding entry becomes empty. Test: atest VirtualTouchscreenTest Bug: 256172250 Change-Id: I7df865288c0e180db8c6f81c4ad2505913d56492
Loading
Please register or sign in to comment