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

Commit cf3d1458 authored by Louis Chang's avatar Louis Chang
Browse files

Fix PinnedStackTests#testPinnedStackWithDockedStack

The split-screen-primary root task's windowing mode was
reset while moving a split-screen-primary task to
split-screen-primary windowing mode.

Avoid doing so if the task is already in split-screen-primary.

Bug: 153843333
Test: atest PinnedStackTests
Change-Id: I058ee89c42adc0ed0902c565ebda87fc60843179
parent 9f11dd4b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2786,6 +2786,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
        }

        final int prevMode = task.getWindowingMode();
        if (prevMode == windowingMode) {
            // The task is already in split-screen and with correct windowing mode.
            return true;
        }

        moveTaskToSplitScreenPrimaryTask(task, toTop);
        return prevMode != task.getWindowingMode();
    }