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

Commit 3e6f466b authored by Eghosa Ewansiha-Vlachavas's avatar Eghosa Ewansiha-Vlachavas
Browse files

[1/n] Remain in desktop mode if a fullscreen transparent task is launched

Task trampolines are normally tasks which are launched to launch another
task and close themselves. These middle tasks are commonly transparent
as they are only responsible for launching the subsequent task.

Desktop mode is defined by the presence of visible freeform tasks. In
desktop mode transparent tasks (a task with all transparent activities)
are forced to be fullscreen and launch on top of desktop mode (desktop
mode still active behind).

If the last visible freeform task triggers a task trampoline, a
fullscreen transparent task can be launched and the original freeform
task will be closed. At this point there are not visible freeform tasks
so with the existing heuristic, we are not seen as in desktop mode. When
the sequence continues, the fullscreen transparent task will launch
another task and close itself. However, this final task will launch
as fullscreen instead of freeform as we no longer believe we are in desktop
mode.

This change modifies the desktop mode heuristic to be the presence of
visible freeform tasks or the presence of a top transparent task.

Flag: com.android.window.flags.enable_desktop_windowing_modals_policy
Flag: com.android.window.flags.include_top_transparent_fullscreen_task_in_desktop_heuristic
Test: atest WMShellUnitTests:DesktopTasksTransitionObserverTest
Test: atest WMShellUnitTests:AppCompatUtilsTest
Test: atest WMShellUnitTests:DesktopTasksControllerTest
Test: atest WMShellUnitTests:DesktopRepositoryTest
Fixes: 379543275

Change-Id: Idb9371d511928be12ff3da160c98316469f13f0a
parent 7cdd993b
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