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

Commit 3375796c authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Wait for attachment in Activity syncEngine"

parents 9744dff8 0c9aed67
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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()) {