Fix live wallpaper not showing on lock screen after restore

A recent change in nyc-mr2 means that setWallpaperComponent will
promote any static system wallpaper to the lock screen.  If we don't
actually have a static lock wallpaper to restore, we need to explicitly
clear the lock wallpaper to have the live one show through

Test: manually using adb backup / restore
Bug: 35090402
Change-Id: I8a2c5ffbaefe172c9d78a9f746ab87d9bc6b7448
(cherry picked from commit 96eb5b724b)
This commit is contained in:
Bryan Mawhinney
2017-02-07 15:27:19 +00:00
parent c342666ac8
commit cd757d4979

View File

@@ -233,6 +233,11 @@ public class WallpaperBackupAgent extends BackupAgent {
Slog.i(TAG, "Using wallpaper service " + wpService);
}
mWm.setWallpaperComponent(wpService, UserHandle.USER_SYSTEM);
if (!lockImageStage.exists()) {
// We have a live wallpaper and no static lock image,
// allow live wallpaper to show "through" on lock screen.
mWm.clear(FLAG_LOCK);
}
} else {
if (DEBUG) {
Slog.v(TAG, "Can't use wallpaper service " + wpService);