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

Commit 778c0836 authored by Jorge Gil's avatar Jorge Gil
Browse files

Desks: Update desk launch root state on core-started transitions

When switching users, visible desks can be moved to back (or to front if
the new user had a desk visible) without Shell knowing about the
transition and thus not applying launch-root updates correctly.

With this change, DesksTransitionObserver monitors for updates to desk
roots and applies launch-root updates accordingly.

Desk state in the repository doesn't need to be changed because:
1) We want to keep the desk "active" from the repository pov even it's
   in the back (because it belongs to a non active user)
2) There isn't enough information in TransitionInfo to know to which
   user a desk belongs anyway - desks, and thus deskIds can be shared
   across users right now, also TaskInfo#userId of non leaf task is
   meaningless (it just points to the current user), and also the
   transition comes in before SysUI/Shell knows about the user-switch,
   so the "currentUserId" to Shell will point to the old user.

Flag: com.android.window.flags.enable_multiple_desktops_backend
Bug: 404591902
Test: switch users with desks active on both users, verify desk and
desktop windows are restored - and repeat with both reused deskIds and
different deskIds.

Change-Id: I452d819e0b4e782286f297331d91598434497d2b
parent ffc99ac9
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