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
Loading
Please register or sign in to comment