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

Commit 06bfc124 authored by Jorge Gil's avatar Jorge Gil
Browse files

Desks: Allow pre-creating desk roots without creating the desk

Instead of always creating a default desk, which was necessary because
a desk root needs to be available when moving into desktop for the first
time (because creating desk roots is slow / async), this change changes
that logic to only pre-create the desk root, without letting the
DesktopRepository know about any first/default desk being created.

This fixes an issue in touch-first displays that should not show an
empty/default desk by default on boot, and should instead only show it
after explicitly entering desktop.

To allow creating the "real" desk (the one seen by DesktopRepository) in
sync, this change introduces a createDeskImmediate() function that
assumes a default desk can be created in sync because a root has been
pre-created already. This a short-term bandaid because many callpoints
require a default desk to be available synchronously. Long term, callers
should be refactored to be able to request and wait for a default desk
to be created before continuing their normal flow.

Flag: com.android.window.flags.enable_multiple_desktops_backend
Bug: 399394443
Test: check root is precreated on boot in tablets, but the desk isn't -
then enter desktop and check the desk was created with the pre-created
root.

Change-Id: I50d5c16d4c81f0aae065f7b1139f8f15e03963ef
parent b9232c16
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