Persist wallpaper changes after migration

After a migration (e.g. set a wallpaper on home when having a live
wallpaper on home+lock), the changes need to be persisted in
wallpaper_info.xml. Otherwise after reboot, the wallpapers won't be
rendered correctly.

The complete() method of this CL is only called when the lockscreen
livewallpaper flag is enabled, so this change is under flag.

Flag: lockscreen lwp
Bug: 286061806
Test: atest WallpaperManagerTest
Test: manually check that the bug is fixed
Change-Id: I704761c20e66e279a0e080e29dff3fa788d2ecf1
This commit is contained in:
Aurélien Pomini
2023-06-07 09:31:31 +00:00
parent aba40fab67
commit 900b78a92c

View File

@@ -1417,6 +1417,10 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
}
}
synchronized (mLock) {
saveSettingsLocked(mNewWallpaper.userId);
}
if (DEBUG) {
Slog.v(TAG, "--- wallpaper changed --");
Slog.v(TAG, "new sysWp: " + mWallpaperMap.get(mCurrentUserId));