Loading core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -201,3 +201,14 @@ flag { bug: "407669465" is_fixed_read_only: true } flag { namespace: "windowing_sdk" name: "fix_fullscreen_in_multi_window" description: "Let leaf task inherits the windowing mode from the root task." bug: "408087047" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file services/core/java/com/android/server/wm/TaskLaunchParamsModifier.java +19 −2 Original line number Diff line number Diff line Loading @@ -303,6 +303,17 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier { } else { if (DEBUG) appendLog("non-freeform-task-display-area"); } boolean isNonRootLeafTask = com.android.window.flags.Flags.fixFullscreenInMultiWindow() ? task != null && !task.isRootTask() : false; if (launchMode == WINDOWING_MODE_FULLSCREEN && isNonRootLeafTask && task.getRootTask().inMultiWindowMode()) { // Seems not making sense to have a fullscreen task in a multi-window Task, let it // inherits from the root task. launchMode = WINDOWING_MODE_UNDEFINED; if (DEBUG) appendLog("inherit-rootTask"); } // If launch mode matches display windowing mode, let it inherit from display. outParams.mWindowingMode = launchMode == suggestedDisplayArea.getWindowingMode() && !shouldUpdateExistingTaskWindowingMode(task, launchMode) Loading @@ -314,8 +325,14 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier { // STEP 3: Finalize the display area. Here we allow WM shell route all launches that match // certain criteria to specific task display areas. final int resolvedMode = (launchMode != WINDOWING_MODE_UNDEFINED) ? launchMode final int resolvedMode; if (launchMode == WINDOWING_MODE_UNDEFINED) { resolvedMode = isNonRootLeafTask ? task.getRootTask().getWindowingMode() : suggestedDisplayArea.getWindowingMode(); } else { resolvedMode = launchMode; } TaskDisplayArea taskDisplayArea = suggestedDisplayArea; // If launch task display area is set in options we should just use it. We assume the // suggestedDisplayArea has the right one in this case. Loading Loading
core/java/android/window/flags/windowing_sdk.aconfig +11 −0 Original line number Diff line number Diff line Loading @@ -201,3 +201,14 @@ flag { bug: "407669465" is_fixed_read_only: true } flag { namespace: "windowing_sdk" name: "fix_fullscreen_in_multi_window" description: "Let leaf task inherits the windowing mode from the root task." bug: "408087047" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file
services/core/java/com/android/server/wm/TaskLaunchParamsModifier.java +19 −2 Original line number Diff line number Diff line Loading @@ -303,6 +303,17 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier { } else { if (DEBUG) appendLog("non-freeform-task-display-area"); } boolean isNonRootLeafTask = com.android.window.flags.Flags.fixFullscreenInMultiWindow() ? task != null && !task.isRootTask() : false; if (launchMode == WINDOWING_MODE_FULLSCREEN && isNonRootLeafTask && task.getRootTask().inMultiWindowMode()) { // Seems not making sense to have a fullscreen task in a multi-window Task, let it // inherits from the root task. launchMode = WINDOWING_MODE_UNDEFINED; if (DEBUG) appendLog("inherit-rootTask"); } // If launch mode matches display windowing mode, let it inherit from display. outParams.mWindowingMode = launchMode == suggestedDisplayArea.getWindowingMode() && !shouldUpdateExistingTaskWindowingMode(task, launchMode) Loading @@ -314,8 +325,14 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier { // STEP 3: Finalize the display area. Here we allow WM shell route all launches that match // certain criteria to specific task display areas. final int resolvedMode = (launchMode != WINDOWING_MODE_UNDEFINED) ? launchMode final int resolvedMode; if (launchMode == WINDOWING_MODE_UNDEFINED) { resolvedMode = isNonRootLeafTask ? task.getRootTask().getWindowingMode() : suggestedDisplayArea.getWindowingMode(); } else { resolvedMode = launchMode; } TaskDisplayArea taskDisplayArea = suggestedDisplayArea; // If launch task display area is set in options we should just use it. We assume the // suggestedDisplayArea has the right one in this case. Loading