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

Commit d87d2bd6 authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "Preserve letterbox while dragResizing" into pi-dev

am: 2dae40bf

Change-Id: I7756f489afd1d26d63438672d599bfbb0b415bdb
parents 07c746cd 2dae40bf
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1482,11 +1482,13 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree

    void layoutLetterbox(WindowState winHint) {
        final WindowState w = findMainWindow();
        if (w != winHint && winHint != null && w != null) {
        if (w == null || winHint != null && w != winHint) {
            return;
        }
        final boolean needsLetterbox = w != null && w.isLetterboxedAppWindow()
                && fillsParent() && w.hasDrawnLw();
        final boolean surfaceReady = w.hasDrawnLw()  // Regular case
                || w.mWinAnimator.mSurfaceDestroyDeferred  // The preserved surface is still ready.
                || w.isDragResizeChanged();  // Waiting for relayoutWindow to call preserveSurface.
        final boolean needsLetterbox = w.isLetterboxedAppWindow() && fillsParent() && surfaceReady;
        if (needsLetterbox) {
            if (mLetterbox == null) {
                mLetterbox = new Letterbox(() -> makeChildSurface(null));