Support split-screen modes on freeform displays

This was originally not allowed to prevent mistakes while
transitioning to new split-screen and didn't pose a problem
because Tiles didn't hit this check. Now that the transition
is complete, this is not needed. Also, now that everything
is Tasks, this check prevents creating the root surfaces
if the display is currently freeform. This doesn't make
sense because a display can change to freeform after adding
the root Tasks and it'd be fine.

Bug: 151881448
Test: Create root split task on freeform display (eg. via ARC)
Change-Id: I90a1ba67d2c6446e709c705458c4f6c33b4007cc
This commit is contained in:
Evan Rosky
2020-05-20 19:18:16 -07:00
parent c83fbdea5c
commit 07acd07061

View File

@@ -1275,14 +1275,10 @@ final class TaskDisplayArea extends DisplayArea<ActivityStack> {
return true;
}
final int displayWindowingMode = getWindowingMode();
if (windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY
|| windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY) {
return supportsSplitScreen
&& WindowConfiguration.supportSplitScreenWindowingMode(activityType)
// Freeform windows and split-screen windows don't mix well, so prevent
// split windowing modes on freeform displays.
&& displayWindowingMode != WINDOWING_MODE_FREEFORM;
&& WindowConfiguration.supportSplitScreenWindowingMode(activityType);
}
if (!supportsFreeform && windowingMode == WINDOWING_MODE_FREEFORM) {