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

Commit 904191b9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Desks: Exclude non-filling tasks from show system bars policy" into main

parents 1c7ef28d c09cc08a
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ import static android.view.WindowManagerGlobal.ADD_MULTIPLE_SINGLETON;
import static android.view.WindowManagerGlobal.ADD_OKAY;
import static android.view.WindowManagerPolicyConstants.ACTION_HDMI_PLUGGED;
import static android.view.WindowManagerPolicyConstants.EXTRA_HDMI_PLUGGED_STATE;
import static android.window.DesktopExperienceFlags.ENABLE_RESTRICT_FREEFORM_HIDDEN_SYSTEM_BARS_TO_FILLING_TASKS;
import static android.window.DisplayAreaOrganizer.FEATURE_UNDEFINED;

import static com.android.internal.protolog.WmProtoLogGroups.WM_DEBUG_ANIM;
@@ -2786,7 +2787,14 @@ public class DisplayPolicy {
                defaultTaskDisplayArea.getRootTask(task -> task.isVisible()
                        && task.getTopLeafTask().hasAdjacentTask())
                        != null;
        final Task topFreeformTask = defaultTaskDisplayArea
        final Task topFreeformTask =
                ENABLE_RESTRICT_FREEFORM_HIDDEN_SYSTEM_BARS_TO_FILLING_TASKS.isTrue()
                        ? defaultTaskDisplayArea.getTask(task ->
                                task.getWindowingMode() == WINDOWING_MODE_FREEFORM
                                // Must be filling to avoid container-only roots, such as
                                // created-by-organizer desk roots.
                                && task.hasFillingContent())
                        : defaultTaskDisplayArea
                                .getTopRootTaskInWindowingMode(WINDOWING_MODE_FREEFORM);
        final boolean freeformRootTaskVisible = topFreeformTask != null
                && topFreeformTask.isVisible();