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
This commit is contained in:
Louis Chang
2020-04-16 16:36:05 +08:00
parent 9f11dd4b64
commit cf3d145834

View File

@@ -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();
}