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

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

Merge "Save pinned stack bounds when there is no reparenting"

parents 3839bf83 7d0c2c0d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4712,6 +4712,12 @@ class ActivityStack extends TaskStack {
            throw new RuntimeException("There should be only one task in a pinned stack.");
        }

        // give pinned stack a chance to save current bounds, this should happen before reparent.
        final ActivityRecord top = topRunningNonOverlayTaskActivity();
        if (top != null && top.isVisible()) {
            top.savePinnedStackBounds();
        }

        mWindowManager.inSurfaceTransaction(() -> {
            final Task task = mChildren.get(0);
            setWindowingMode(WINDOWING_MODE_UNDEFINED);
+0 −7
Original line number Diff line number Diff line
@@ -674,13 +674,6 @@ class Task extends WindowContainer<ActivityRecord> implements ConfigurationConta
        boolean kept = true;
        try {
            final ActivityRecord r = topRunningActivityLocked();
            // give pinned stack a chance to save current bounds, this needs to be before the
            // actual reparent.
            if (inPinnedWindowingMode()
                    && !(toStackWindowingMode == WINDOWING_MODE_UNDEFINED)
                    && r.isVisible()) {
                r.savePinnedStackBounds();
            }
            final boolean wasFocused = r != null && root.isTopDisplayFocusedStack(sourceStack)
                    && (topRunningActivityLocked() == r);
            final boolean wasResumed = r != null && sourceStack.getResumedActivity() == r;