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

Skip to content
Commit 6a537023 authored by Joël Stemmer's avatar Joël Stemmer
Browse files

Pass user handle to super.onCreate in SystemUI backup agent

The SystemUI backup agent is overriding the BackupAgent.onCreate method
to obtain a user handle, but it doesn't pass it further to
super.onCreate. When the BackupAgent doesn't have a user handle, it
falls back to using UserHandle.USER_SYSTEM (User 0). The BackupAgent
uses this user id when telling the backup manager service it
successfully completed a backup or restore operation.

In normal circumstances this would be fine, because the backup manager
service runs as user 0. However, in Headless System User Mode (HSUM) the
backup manager service is running as user 10. This means the completion
signal from the BackupAgent never reaches the backup manager service. As
a result a timeout is triggered after 60 seconds. Even though the
restore in this case completed successfully, the backup manager service
treats this as a failure and will clear the app data. One of the visible
consequences for SystemUI is that the wallpaper is reset to default.

This change fixes that by passing the user handle to `super.onCreate`.
I've also changed the `onCreate` method to only take a UserHandle
because the one that was overridden has been marked as deprecated. Also,
the second parameter was not used anyway and was actually incorrectly
named (should be `backupDestination` not `operationType`).

Bug: 324565837
Test: Manually tested on HSUM device
Flag: EXEMPT bugfix
Change-Id: I8711fda43952bcfe47edfcf8a7ff9a9e93369d41
parent 4c1803f8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment