Don't touch empty wallpaper sentinel every backup.
Even when the diffing algorithm is good (which it may not always be),
it isn't free to apply the diff server side.
Test: manual
Change-Id: I01859a57b0a0a974b541ce03f7c35a2977df7f7c
diff --git a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
index 4254a0b..2e40c1a 100644
--- a/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
+++ b/packages/WallpaperBackup/src/com/android/wallpaperbackup/WallpaperBackupAgent.java
@@ -115,8 +115,10 @@
// We always back up this 'empty' file to ensure that the absence of
// storable wallpaper imagery still produces a non-empty backup data
// stream, otherwise it'd simply be ignored in preflight.
- FileOutputStream touch = new FileOutputStream(empty);
- touch.close();
+ if (!empty.exists()) {
+ FileOutputStream touch = new FileOutputStream(empty);
+ touch.close();
+ }
fullBackupFile(empty, data);
SharedPreferences prefs = getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);