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

Commit 9b316d9c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check client hidden state before resetting draw state."

parents 29f3a0b6 78e55425
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -548,6 +548,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
                if (isHidden()) {
                    waitingToShow = true;

                    // If the client isn't hidden, we don't need to reset the drawing state.
                    if (isClientHidden()) {
                        // Let's reset the draw state in order to prevent the starting window to be
                        // immediately dismissed when the app still has the surface.
                        forAllWindows(w -> {
@@ -561,6 +563,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
                        }, true /* traverseTopToBottom */);
                    }
                }
            }

            // In the case where we are making an app visible but holding off for a transition,
            // we still need to tell the client to make its windows visible so they get drawn.