Loading
Fix potential synchronized race between SF and InputFlinger
The 'CountDownLatch' is used to control the synchronization behavior if a transaction is synchronous or contains the syncInputWindow command, while updating input windows asynchronously, if there is another synchronized transaction queued and commited before input windows updated, it may cause the transaction return early and cause other input function such as 'transferTouchFocus' failed. This CL distinguish the transaction and input windows updating synchronization that could help to signal the CountDownLatch in correct situation. Test: atest SurfaceFlinger_tests Test: atest CrossDragAndDropTests --rerun-until-failure 50 Bug: 183877670 Bug: 183877512 Bug: 183880412 Change-Id: I68e124006e86d8b9c4b8c528418b9db2065b21de