Fix input infos are inconsistent between WMS and InputFlinger (1/2)
In single focus system, we would expect the focused display could be changed when receiving a key event. The way we update window infos from WMS to InputFlinger is using SurfaceControl.Transaction, and we would expect the api 'syncInputTransactions' could wait until all window infos update to InputFlinger. This would collect all input transactions from all displays into one to make sure all input windows could be sync at same time. - Change 'updateInputWindowsImmediately' that we could update the input transation and merge it into the passing Transaction that could be collected and applied later. - Wait for 'isAnimationScheduled' to make sure the pending trasaction had been applied before it update the input transaction. - Rename 'setInputWindow' to 'displayRemoved' to match the function more properly. Bug: 150250453 Test: atest --rerun-until-failure 100 WindowFocusTests#testMovingDisplayToTopByKeyEvent Test: atest --rerun-until-failure 10 WindowFocusTests Change-Id: Id06c70bfe76e8c8a0cd50a8ae66b38b444a9d0c2
Loading
Please register or sign in to comment