Merge "Skip transfer starting window from above if current activity has drawn." into udc-dev

This commit is contained in:
Wei Sheng Shih
2023-06-13 03:22:20 +00:00
committed by Android (Google) Code Review

View File

@@ -4550,6 +4550,13 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
* immediately finishes after, so we have to transfer T to M.
*/
void transferStartingWindowFromHiddenAboveTokenIfNeeded() {
final WindowState mainWin = findMainWindow(false);
if (mainWin != null && mainWin.mWinAnimator.getShown()) {
// This activity already has a visible window, so doesn't need to transfer the starting
// window from above activity to here. The starting window will be removed with above
// activity.
return;
}
task.forAllActivities(fromActivity -> {
if (fromActivity == this) return true;
return !fromActivity.isVisibleRequested() && transferStartingWindow(fromActivity);