diff options
| author | 2024-12-05 23:54:17 +0000 | |
|---|---|---|
| committer | 2024-12-05 23:54:17 +0000 | |
| commit | d8c915c0c27747d046c13f8f68a26b55c60e4f64 (patch) | |
| tree | 44ff533a820965c53b1eb7c88587b827576f041b /libs | |
| parent | 4691c79c3f61e00d95db230a40e211d7f1eb7d1d (diff) | |
| parent | d7abea1703abfd3ec1e46537e88a735529bb6210 (diff) | |
Merge "Skip checking display windowing mode if TDA is null" into main
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt index 1a484042cf26..578edd12fb66 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/desktopmode/DesktopTasksController.kt @@ -363,8 +363,15 @@ class DesktopTasksController( } val tdaInfo = rootTaskDisplayAreaOrganizer.getDisplayAreaInfo(displayId) - requireNotNull(tdaInfo) { - "This method can only be called with the ID of a display having non-null DisplayArea." + // A non-organized display (e.g., non-trusted virtual displays used in CTS) doesn't have + // TDA. + if (tdaInfo == null) { + logW( + "forceEnterDesktop cannot find DisplayAreaInfo for displayId=%d. This could happen" + + " when the display is a non-trusted virtual display.", + displayId, + ) + return false } val tdaWindowingMode = tdaInfo.configuration.windowConfiguration.windowingMode val isFreeformDisplay = tdaWindowingMode == WINDOWING_MODE_FREEFORM |