diff options
| author | 2025-02-24 17:12:19 +0000 | |
|---|---|---|
| committer | 2025-03-06 03:43:51 +0000 | |
| commit | c0add4e1010ec2e652de03aa169a6cff5fd7f9ee (patch) | |
| tree | 117bd6f002ddcb2e7addfeea82eedb191ee46740 /libs/androidfw/StringPool.cpp | |
| parent | 8703cf936897e5be2000509909ebf61b16eb45f4 (diff) | |
[39/N] Desks: Restore persisted desks on reboot
Adds support for restoring persisted desks on shell init. Restoring is
done as follows:
1) DisplayController init must run before
DesktopRepositoryInitializerImpl to have a list of available
displays ready (already runs first because of dagger dependencies)
2) On init, DesktopRepositoryInitializerImpl selects desks to persist
based on available displays from (1) and desk id validity for
single-desk edge cases
3) For each desk, DesktopRepositoryInitializerImpl creates a new desk
instance (root task), inserts the desktop data with the new deskId
and deletes the data under the old deskId
4) DesktopRepositoryInitializerImpl maintains an "isInitialized"
StateFlow<Boolean> and pings it when finished
5) DesktopDisplayEventHandler collects this StateFlow, and when |true|,
checks whether an empty desk needs to be created. This prevents
creating the empty/default desk when persisted desks will be
restored.
It also starts non-running tasks when activating a desk similar to how
bringDesktopAppsToFront() did it for single-desk setups.
Flag: com.android.window.flags.enable_multiple_desktops_backend
Bug: 393961770
Bug: 391484873
Fix: 393978864
Test: create a couple of desks and add tasks to them, reboot - verify
desks still exist in the repository (with new deskIds)
Change-Id: Idf38fef305088043ea4dbb0a8095181248b6116d
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions