Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9de96ab authored by wilsonshih's avatar wilsonshih Committed by Wei Sheng Shih
Browse files

Fixes unable remove starting window due to transferStartingWindow

When starting two activities for embedded activity, it's possible for
the starting window to be transferred to the second launched activity
before the starting window is created.
This causes Shell to receive two addStartingWindow requests for
different app tokens, and WindowManager rejects the first request for
the first launched activity because the startingData is transferred to
the second activity.
To prevent the window record from being removed too early, also track
the current app token, and only stop tracking when all creation
requests have failed.

Also fixes the testRemoveStartingInShell, there should wait for the
TransactionCommittedListener to be added to the main execute queue
before flushing.

Bug: 413589384
Bug: 414192230
Flag: com.android.window.flags.remove_starting_in_transition
Test: atest FlickerTestsActivityEmbedding
Test: atest StartingWindowControllerTests
Change-Id: I48ece2a089068e2101c6bf5f755020e1204bf713
parent 6e14ced4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment