summaryrefslogtreecommitdiff
path: root/libs/androidfw/StringPool.cpp
diff options
context:
space:
mode:
author Joël Stemmer <jstemmer@google.com> 2024-05-22 11:08:45 +0100
committer Joël Stemmer <jstemmer@google.com> 2024-05-22 14:23:23 +0100
commit6a537023c74096c37f69d2ae2da4f88cb3c72923 (patch)
tree28a39f387bffb5a5ecdf509bcc3e7d4a256993e2 /libs/androidfw/StringPool.cpp
parent4c1803f8d38085f29148bef72fbec74703e9812d (diff)
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
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions