Skip to content
Commit 8874a961 authored by Arthur Hung's avatar Arthur Hung
Browse files

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
parent 19f8283a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment