Loading libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayModeController.kt +15 −4 Original line number Diff line number Diff line Loading @@ -97,9 +97,16 @@ class DesktopDisplayModeController( } private fun updateDisplayWindowingMode(displayId: Int, targetDisplayWindowingMode: Int) { val tdaInfo = requireNotNull(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId)) { "DisplayAreaInfo of display#$displayId must be non-null." val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId) // A non-organized display (e.g., non-trusted virtual displays used in CTS) doesn't have // TDA. if (tdaInfo == null) { logW( "updateDisplayWindowingMode cannot find DisplayAreaInfo for displayId=%d. This " + " could happen when the display is a non-trusted virtual display.", displayId, ) return } val currentDisplayWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode if (currentDisplayWindowingMode == targetDisplayWindowingMode) { Loading Loading @@ -220,6 +227,10 @@ class DesktopDisplayModeController( ProtoLog.v(WM_SHELL_DESKTOP_MODE, "%s: $msg", TAG, *arguments) } private fun logW(msg: String, vararg arguments: Any?) { ProtoLog.w(WM_SHELL_DESKTOP_MODE, "%s: $msg", TAG, *arguments) } companion object { private const val TAG = "DesktopDisplayModeController" } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopDisplayModeController.kt +15 −4 Original line number Diff line number Diff line Loading @@ -97,9 +97,16 @@ class DesktopDisplayModeController( } private fun updateDisplayWindowingMode(displayId: Int, targetDisplayWindowingMode: Int) { val tdaInfo = requireNotNull(rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId)) { "DisplayAreaInfo of display#$displayId must be non-null." val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId) // A non-organized display (e.g., non-trusted virtual displays used in CTS) doesn't have // TDA. if (tdaInfo == null) { logW( "updateDisplayWindowingMode cannot find DisplayAreaInfo for displayId=%d. This " + " could happen when the display is a non-trusted virtual display.", displayId, ) return } val currentDisplayWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode if (currentDisplayWindowingMode == targetDisplayWindowingMode) { Loading Loading @@ -220,6 +227,10 @@ class DesktopDisplayModeController( ProtoLog.v(WM_SHELL_DESKTOP_MODE, "%s: $msg", TAG, *arguments) } private fun logW(msg: String, vararg arguments: Any?) { ProtoLog.w(WM_SHELL_DESKTOP_MODE, "%s: $msg", TAG, *arguments) } companion object { private const val TAG = "DesktopDisplayModeController" } Loading