Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +4 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,10 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel, FocusT } private boolean shouldShowWindowDecor(RunningTaskInfo taskInfo) { if (mDisplayController.getDisplay(taskInfo.displayId) == null) { // If DisplayController doesn't have it tracked, it could be a private/managed display. return false; } if (taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { return true; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +4 −0 Original line number Diff line number Diff line Loading @@ -1643,6 +1643,10 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, } private boolean shouldShowWindowDecor(RunningTaskInfo taskInfo) { if (mDisplayController.getDisplay(taskInfo.displayId) == null) { // If DisplayController doesn't have it tracked, it could be a private/managed display. return false; } if (taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) return true; if (mSplitScreenController != null && mSplitScreenController.isTaskRootOrStageRoot(taskInfo.taskId)) { Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.platform.test.flag.junit.SetFlagsRule import android.testing.TestableContext import android.util.SparseArray import android.view.Choreographer import android.view.Display import android.view.Display.DEFAULT_DISPLAY import android.view.IWindowManager import android.view.InputChannel Loading Loading @@ -157,6 +158,7 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { protected val mockRecentsTransitionHandler = mock<RecentsTransitionHandler>() protected val motionEvent = mock<MotionEvent>() val displayLayout = mock<DisplayLayout>() val display = mock<Display>() protected lateinit var spyContext: TestableContext private lateinit var desktopModeEventLogger: DesktopModeEventLogger Loading @@ -183,6 +185,7 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { desktopModeEventLogger = mock<DesktopModeEventLogger>() whenever(mockDesktopUserRepositories.current).thenReturn(mockDesktopRepository) whenever(mockDisplayController.getDisplayContext(any())).thenReturn(spyContext) whenever(mockDisplayController.getDisplay(any())).thenReturn(display) whenever(mockDesktopUserRepositories.getProfile(anyInt())) .thenReturn(mockDesktopRepository) desktopModeWindowDecorViewModel = DesktopModeWindowDecorViewModel( Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +4 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,10 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel, FocusT } private boolean shouldShowWindowDecor(RunningTaskInfo taskInfo) { if (mDisplayController.getDisplay(taskInfo.displayId) == null) { // If DisplayController doesn't have it tracked, it could be a private/managed display. return false; } if (taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) { return true; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +4 −0 Original line number Diff line number Diff line Loading @@ -1643,6 +1643,10 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel, } private boolean shouldShowWindowDecor(RunningTaskInfo taskInfo) { if (mDisplayController.getDisplay(taskInfo.displayId) == null) { // If DisplayController doesn't have it tracked, it could be a private/managed display. return false; } if (taskInfo.getWindowingMode() == WINDOWING_MODE_FREEFORM) return true; if (mSplitScreenController != null && mSplitScreenController.isTaskRootOrStageRoot(taskInfo.taskId)) { Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModelTestsBase.kt +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.platform.test.flag.junit.SetFlagsRule import android.testing.TestableContext import android.util.SparseArray import android.view.Choreographer import android.view.Display import android.view.Display.DEFAULT_DISPLAY import android.view.IWindowManager import android.view.InputChannel Loading Loading @@ -157,6 +158,7 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { protected val mockRecentsTransitionHandler = mock<RecentsTransitionHandler>() protected val motionEvent = mock<MotionEvent>() val displayLayout = mock<DisplayLayout>() val display = mock<Display>() protected lateinit var spyContext: TestableContext private lateinit var desktopModeEventLogger: DesktopModeEventLogger Loading @@ -183,6 +185,7 @@ open class DesktopModeWindowDecorViewModelTestsBase : ShellTestCase() { desktopModeEventLogger = mock<DesktopModeEventLogger>() whenever(mockDesktopUserRepositories.current).thenReturn(mockDesktopRepository) whenever(mockDisplayController.getDisplayContext(any())).thenReturn(spyContext) whenever(mockDisplayController.getDisplay(any())).thenReturn(display) whenever(mockDesktopUserRepositories.getProfile(anyInt())) .thenReturn(mockDesktopRepository) desktopModeWindowDecorViewModel = DesktopModeWindowDecorViewModel( Loading