From 07acd070614630234007c368086e13134d6e3f41 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Wed, 20 May 2020 19:18:16 -0700 Subject: [PATCH] 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 --- .../core/java/com/android/server/wm/TaskDisplayArea.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/services/core/java/com/android/server/wm/TaskDisplayArea.java b/services/core/java/com/android/server/wm/TaskDisplayArea.java index 6661c30723d27..9130483325b24 100644 --- a/services/core/java/com/android/server/wm/TaskDisplayArea.java +++ b/services/core/java/com/android/server/wm/TaskDisplayArea.java @@ -1275,14 +1275,10 @@ final class TaskDisplayArea extends DisplayArea { 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) {