Always store wallpaper metadata to backup
am: a611fdc66b
Change-Id: I16566a7965beeb780367723e3572c32ce841db55
This commit is contained in:
@@ -147,11 +147,12 @@ public class WallpaperBackupAgent extends BackupAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// only back up the wallpapers if we've been told they're eligible
|
// only back up the wallpapers if we've been told they're eligible
|
||||||
if ((sysEligible || lockEligible) && mWallpaperInfo.exists()) {
|
if (mWallpaperInfo.exists()) {
|
||||||
if (sysChanged || lockChanged || !infoStage.exists()) {
|
if (sysChanged || lockChanged || !infoStage.exists()) {
|
||||||
if (DEBUG) Slog.v(TAG, "New wallpaper configuration; copying");
|
if (DEBUG) Slog.v(TAG, "New wallpaper configuration; copying");
|
||||||
FileUtils.copyFileOrThrow(mWallpaperInfo, infoStage);
|
FileUtils.copyFileOrThrow(mWallpaperInfo, infoStage);
|
||||||
}
|
}
|
||||||
|
if (DEBUG) Slog.v(TAG, "Storing wallpaper metadata");
|
||||||
fullBackupFile(infoStage, data);
|
fullBackupFile(infoStage, data);
|
||||||
}
|
}
|
||||||
if (sysEligible && mWallpaperFile.exists()) {
|
if (sysEligible && mWallpaperFile.exists()) {
|
||||||
@@ -159,6 +160,7 @@ public class WallpaperBackupAgent extends BackupAgent {
|
|||||||
if (DEBUG) Slog.v(TAG, "New system wallpaper; copying");
|
if (DEBUG) Slog.v(TAG, "New system wallpaper; copying");
|
||||||
FileUtils.copyFileOrThrow(mWallpaperFile, imageStage);
|
FileUtils.copyFileOrThrow(mWallpaperFile, imageStage);
|
||||||
}
|
}
|
||||||
|
if (DEBUG) Slog.v(TAG, "Storing system wallpaper image");
|
||||||
fullBackupFile(imageStage, data);
|
fullBackupFile(imageStage, data);
|
||||||
prefs.edit().putInt(SYSTEM_GENERATION, sysGeneration).apply();
|
prefs.edit().putInt(SYSTEM_GENERATION, sysGeneration).apply();
|
||||||
}
|
}
|
||||||
@@ -169,6 +171,7 @@ public class WallpaperBackupAgent extends BackupAgent {
|
|||||||
if (DEBUG) Slog.v(TAG, "New lock wallpaper; copying");
|
if (DEBUG) Slog.v(TAG, "New lock wallpaper; copying");
|
||||||
FileUtils.copyFileOrThrow(mLockWallpaperFile, lockImageStage);
|
FileUtils.copyFileOrThrow(mLockWallpaperFile, lockImageStage);
|
||||||
}
|
}
|
||||||
|
if (DEBUG) Slog.v(TAG, "Storing lock wallpaper image");
|
||||||
fullBackupFile(lockImageStage, data);
|
fullBackupFile(lockImageStage, data);
|
||||||
prefs.edit().putInt(LOCK_GENERATION, lockGeneration).apply();
|
prefs.edit().putInt(LOCK_GENERATION, lockGeneration).apply();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user