Handle multiple windows in transferTouch
After the recent SPY window refactor, multiple windows could be getting touch gesture at the same time. When the 'transferTouch' API is invoked, inputdispatcher needs to find the best window which to take touch from. The logic used to be 'take the display which has exactly 1 touched window, and then take that window'. This breaks when spy windows are in use, because now both the 'regular' and the spy window would be getting the same touch. In this CL, we refine the logic for which window should be losing touch. We would take the first foreground window that is being touched, on the specific display. We will also now explicitly ban split touch transfers. If touch is split across multiple windows (excluding spy and wallpaper windows), transferTouch will fail. Bug: 220077253 Test: atest inputflinger_tests Change-Id: I20a24b063dc0e0103a1692f85f99849544e7ec60
Loading
Please register or sign in to comment