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

Commit f15a7351 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix wrong inset bounds

When passing tempTaskBounds != null but tempInsetBounds == null,
we ended up using the stack bounds to calculate the insets, which
is really wrong. First fallback onto tempTaskBounds, and then the
stack bounds.

Bug: 27887505
Change-Id: I66ee0da1415a67af824f4c63b56644d590728813
parent 5ba429c4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1984,6 +1984,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
        mTmpConfigs.clear();
        mTmpInsetBounds.clear();
        final ArrayList<TaskRecord> tasks = stack.getAllTasks();
        final Rect taskBounds = tempTaskBounds != null ? tempTaskBounds : bounds;
        final Rect insetBounds = tempTaskInsetBounds != null ? tempTaskInsetBounds : taskBounds;
        for (int i = tasks.size() - 1; i >= 0; i--) {
            final TaskRecord task = tasks.get(i);
            if (task.isResizeable()) {
@@ -1995,9 +1997,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
                    fitWithinBounds(tempRect2, bounds);
                    task.updateOverrideConfiguration(tempRect2);
                } else {
                    task.updateOverrideConfiguration(
                            tempTaskBounds != null ? tempTaskBounds : bounds,
                            tempTaskInsetBounds != null ? tempTaskInsetBounds : bounds);
                    task.updateOverrideConfiguration(taskBounds, insetBounds);
                }
            }