Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 813cfb25 authored by Ben Lin's avatar Ben Lin
Browse files

[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
parent 62a6069f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment