[PD/ED] Add AppHandleVisibilityHelper and new DesktopModeStatus method.
These two helper methods are used in conjunction at runtime to see what modes should be used: - AppHandleVisibilityHelper checks against a task's current display attributes and the task's attributes to see if the app handle should appear - DesktopModeStatus#isDesktopModeSupportedOnDisplay is a new helper method that checks overall device's DesktopMode status and whether its internal display can host desktops to see if a display should be able to have desktop sessions or not. This is also used to deduce a device's mode: if desktop mode is enabled but internal display can't host desktops, then it is a projected display. Else, it is Extended. This also changes DesktopModeStatus#isDeviceEligibleForDesktkopMode, which base on the value of Projected Display flag, will now start returning true for Projected Display phones (e.g. phones). Bug: 384568161 Test: atest Flag: com.android.window.flags.enable_bug_fixes_for_secondary_display Flag: com.android.window.flags.enable_projected_display_desktop_mode Change-Id: Iaea57a990dcc1b55340760da12db6085b4b9c204
Loading
Please register or sign in to comment