summaryrefslogtreecommitdiff
path: root/packages/WallpaperBackup
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2016-06-17 13:24:02 -0700
committerChristopher Tate <ctate@google.com>2016-06-22 13:53:41 -0700
commit5cb5e89d770f474031e4ab30fb7f24c66333590a (patch)
tree187e55259a6e10550a0e0faf29048c56acd730bc /packages/WallpaperBackup
parent0bf31c3fa6263f595022d8f3addfd4d28f70db99 (diff)
Fix adb backup/restore
* Exclude key/value-only backup participants until we have a chance to augment the archive format with proper handling. * Don't back up 'stopped' apps, which would un-stop them * Fix unspecified-user bindService/startActivity invocations * Teach adb restore about the onRestoreFinished() lifecycle method * Implement proper app timeout handling in the adb data flows * Backstop wallpaper backup against rare leftover-state issues Bug 28056941 Change-Id: Ia59c71a2c74a632a2c2a527b9b7374229c440d46
Diffstat (limited to 'packages/WallpaperBackup')
-rw-r--r--packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
index a3ea592ebe5d..47d1493e1574 100644
--- a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
+++ b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
@@ -92,6 +92,11 @@ public class WallpaperBackupAgent extends BackupAgent {
if (DEBUG) {
Slog.v(TAG, "Wallpaper is backup-eligible; linking & writing");
}
+
+ // In case of prior muddled state
+ infoStage.delete();
+ imageStage.delete();
+
Os.link(mWallpaperInfo.getCanonicalPath(), infoStage.getCanonicalPath());
fullBackupFile(infoStage, data);
Os.link(mWallpaperFile.getCanonicalPath(), imageStage.getCanonicalPath());