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

Commit 0c83561a authored by Jorge Gil's avatar Jorge Gil Committed by Android (Google) Code Review
Browse files

Merge "Only restore to mLastNonFullscreenBounds if requested bounds unset" into tm-qpr-dev

parents ce97eb64 6f009f90
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1858,6 +1858,11 @@ class Task extends TaskFragment {
        if (getRequestedOverrideWindowingMode() == WINDOWING_MODE_UNDEFINED) {
            nextPersistTaskBounds = newParentConfig.windowConfiguration.persistTaskBounds();
        }
        // Only restore to the last non-fullscreen bounds when the requested override bounds
        // have not been explicitly set already.
        nextPersistTaskBounds &=
                (getRequestedOverrideConfiguration().windowConfiguration.getBounds() == null
                || getRequestedOverrideConfiguration().windowConfiguration.getBounds().isEmpty());
        if (!prevPersistTaskBounds && nextPersistTaskBounds
                && mLastNonFullscreenBounds != null && !mLastNonFullscreenBounds.isEmpty()) {
            // Bypass onRequestedOverrideConfigurationChanged here to avoid infinite loop.