Loading services/core/java/com/android/server/wm/DisplayPolicy.java +1 −5 Original line number Diff line number Diff line Loading @@ -2636,13 +2636,9 @@ public class DisplayPolicy { final boolean inNonFullscreenFreeformMode = freeformRootTaskVisible && !topFreeformTask.getBounds().equals(mDisplayContent.getBounds()); // Always show status/nav bar for non-fullscreen multi window (excluding PiP). boolean showSystemBarsByLegacyPolicy = adjacentTasksVisible final boolean showSystemBarsByLegacyPolicy = adjacentTasksVisible || (DesktopModeFlags.ENABLE_FULLY_IMMERSIVE_IN_DESKTOP.isTrue() ? inNonFullscreenFreeformMode : freeformRootTaskVisible); if (com.android.window.flags.Flags.forceShowSystemBarForBubble()) { showSystemBarsByLegacyPolicy |= defaultTaskDisplayArea.getRootTask( task -> task.isVisible() && task.isNonFullscreenMultiWindow()) != null; } getInsetsPolicy().updateSystemBars( win, Loading services/core/java/com/android/server/wm/Task.java +0 −8 Original line number Diff line number Diff line Loading @@ -5020,14 +5020,6 @@ class Task extends TaskFragment { return mDisplayContent != null && this == mDisplayContent.getFocusedRootTask(); } /** Whether this Task is multi window (exclude PiP) and not filling parent. */ boolean isNonFullscreenMultiWindow() { if (getWindowingMode() == WINDOWING_MODE_PINNED) { return false; } return !fillsParentBounds(); } /** * Make sure that all activities that need to be visible in the root task (that is, they * currently can be seen by the user) actually are and update their configuration. Loading services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java +0 −16 Original line number Diff line number Diff line Loading @@ -158,22 +158,6 @@ public class InsetsPolicyTest extends WindowTestsBase { assertNull(controls); } @Test @EnableFlags(Flags.FLAG_FORCE_SHOW_SYSTEM_BAR_FOR_BUBBLE) public void testControlsForDispatch_nonFullscreenMultiWindowTaskVisible() { addStatusBar(); addNavigationBar(); final WindowState win = newWindowBuilder("app", TYPE_APPLICATION).setActivityType( ACTIVITY_TYPE_STANDARD).setWindowingMode(WINDOWING_MODE_MULTI_WINDOW).setDisplay( mDisplayContent).build(); win.getTask().setBounds(new Rect(1, 1, 10, 10)); final InsetsSourceControl[] controls = addWindowAndGetControlsForDispatch(win); // The non fullscreen multi window app window must not control any system bars. assertNull(controls); } @Test public void testControlsForDispatch_forceStatusBarVisible() { addStatusBar().mAttrs.forciblyShownTypes |= statusBars(); Loading Loading
services/core/java/com/android/server/wm/DisplayPolicy.java +1 −5 Original line number Diff line number Diff line Loading @@ -2636,13 +2636,9 @@ public class DisplayPolicy { final boolean inNonFullscreenFreeformMode = freeformRootTaskVisible && !topFreeformTask.getBounds().equals(mDisplayContent.getBounds()); // Always show status/nav bar for non-fullscreen multi window (excluding PiP). boolean showSystemBarsByLegacyPolicy = adjacentTasksVisible final boolean showSystemBarsByLegacyPolicy = adjacentTasksVisible || (DesktopModeFlags.ENABLE_FULLY_IMMERSIVE_IN_DESKTOP.isTrue() ? inNonFullscreenFreeformMode : freeformRootTaskVisible); if (com.android.window.flags.Flags.forceShowSystemBarForBubble()) { showSystemBarsByLegacyPolicy |= defaultTaskDisplayArea.getRootTask( task -> task.isVisible() && task.isNonFullscreenMultiWindow()) != null; } getInsetsPolicy().updateSystemBars( win, Loading
services/core/java/com/android/server/wm/Task.java +0 −8 Original line number Diff line number Diff line Loading @@ -5020,14 +5020,6 @@ class Task extends TaskFragment { return mDisplayContent != null && this == mDisplayContent.getFocusedRootTask(); } /** Whether this Task is multi window (exclude PiP) and not filling parent. */ boolean isNonFullscreenMultiWindow() { if (getWindowingMode() == WINDOWING_MODE_PINNED) { return false; } return !fillsParentBounds(); } /** * Make sure that all activities that need to be visible in the root task (that is, they * currently can be seen by the user) actually are and update their configuration. Loading
services/tests/wmtests/src/com/android/server/wm/InsetsPolicyTest.java +0 −16 Original line number Diff line number Diff line Loading @@ -158,22 +158,6 @@ public class InsetsPolicyTest extends WindowTestsBase { assertNull(controls); } @Test @EnableFlags(Flags.FLAG_FORCE_SHOW_SYSTEM_BAR_FOR_BUBBLE) public void testControlsForDispatch_nonFullscreenMultiWindowTaskVisible() { addStatusBar(); addNavigationBar(); final WindowState win = newWindowBuilder("app", TYPE_APPLICATION).setActivityType( ACTIVITY_TYPE_STANDARD).setWindowingMode(WINDOWING_MODE_MULTI_WINDOW).setDisplay( mDisplayContent).build(); win.getTask().setBounds(new Rect(1, 1, 10, 10)); final InsetsSourceControl[] controls = addWindowAndGetControlsForDispatch(win); // The non fullscreen multi window app window must not control any system bars. assertNull(controls); } @Test public void testControlsForDispatch_forceStatusBarVisible() { addStatusBar().mAttrs.forciblyShownTypes |= statusBars(); Loading