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

Commit 9e511e5f authored by Jorge Gil's avatar Jorge Gil
Browse files

Desks: Handle independent activation/deactivation edge cases

Increases handling of independent transitions involving desks or the
desktop wallpaper task to ensure WC order and DesktopRepository state
isn't left in a bad state (such as wallpaper over an active root, or
inactive desk in the repository for a desk that is in front)

1) A desk Changes to-back and to-front should trigger
   deactivation/activation respectively to ensure the launch root state
   is correct. This can happen during CTS runs when Home is brought to
   front as a mean to "reset" state between tests
2) A to-back desk Change of an active desk during user-switches should
   deactivate the launch root, but keep the desk active in the
   repository to restore to when switching back
3) A desktop wallpaper Change to-front and to-back should also trigger
   activation/deactivation respectively (with order changes) to ensure
   order is correct.
4) A desktop wallaper Change to-back during a user-switch should also
   deactivate the launch root, but keep the desk active in the
   repository to restore on switch back.
5) A combined wallpaper to-front and desk to-back could mean the last
   desk task was closed and WM is attempting to bring the next focusable
   task (wallpaper) to front. Ensure the desk is reorded to the front
   of the wallpaper in this case to preserve the empty desk.

Flag: com.android.window.flags.enable_multiple_desktops_backend
Fix: 416173119
Bug: 417045331
Bug: 418619628
Test: atest CtsWindowManagerDeviceWindow \
WindowMetricsActivityTests#testMetricsMatchesDisplayAreaOnFreeformActivity, \
testMetricsMatchesLayoutOnPipActivity
Test: switch users from one with an active desk (empty or not) to one
where we land in Home - check launching tasks defaults to fullscreen
(launch root was deactivated) and switching back restores the desk
Test: switch users from one with an active desk (empty or not) to one
with an active desk (empty or not) - verify desk is restored on switch
back
Test: close the last task in a desk - verify desk remains empty and
active

Change-Id: I8b5018863a4eba76f40e7747b02e9581ac9cbc7f
parent 4df088bd
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