Merge "Wait for attachment in Activity syncEngine"

This commit is contained in:
Evan Rosky
2022-02-08 17:34:37 +00:00
committed by Android (Google) Code Review

View File

@@ -9402,6 +9402,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
boolean isSyncFinished() {
if (!super.isSyncFinished()) return false;
if (!isVisibleRequested()) return true;
// Wait for attach. That is the earliest time where we know if there will be an associated
// display rotation. If we don't wait, the starting-window can finishDrawing first and
// cause the display rotation to end-up in a following transition.
if (!isAttached()) return false;
// If visibleRequested, wait for at-least one visible child.
for (int i = mChildren.size() - 1; i >= 0; --i) {
if (mChildren.get(i).isVisibleRequested()) {