diff options
| author | 2017-02-13 09:06:12 +0000 | |
|---|---|---|
| committer | 2017-02-13 09:06:16 +0000 | |
| commit | 1704c627cd53e47c37a2a5f42e06c1eb18931fb7 (patch) | |
| tree | 0f81427d27c1d8d6239632cc140f946e0e6a7181 | |
| parent | d2c47843591f196420211722f7c2e3bcd8ace2ee (diff) | |
| parent | 96eb5b724bab31125e15eef2c926f6648567c3a1 (diff) | |
Merge changes I8a2c5ffb,I2750695d
* changes:
Fix live wallpaper not showing on lock screen after restore
Workaround wallpaper restore race
| -rw-r--r-- | packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java index ff934ef18677..4254a0ba200a 100644 --- a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java +++ b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java @@ -217,9 +217,6 @@ public class WallpaperBackupAgent extends BackupAgent { final int sysWhich = FLAG_SYSTEM | (lockImageStage.exists() ? 0 : FLAG_LOCK); try { - // First off, revert to the factory state - mWm.clear(FLAG_SYSTEM | FLAG_LOCK); - // It is valid for the imagery to be absent; it means that we were not permitted // to back up the original image on the source device, or there was no user-supplied // wallpaper image present. @@ -233,6 +230,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); |