diff options
Diffstat (limited to 'services/backup')
-rw-r--r-- | services/backup/java/com/android/server/backup/BackupManagerService.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java index d35609e..8fcdd39 100644 --- a/services/backup/java/com/android/server/backup/BackupManagerService.java +++ b/services/backup/java/com/android/server/backup/BackupManagerService.java @@ -3909,6 +3909,16 @@ public class BackupManagerService { return; } + // Don't proceed unless we have already established package metadata + // for the current dataset via a key/value backup pass. + File stateDir = new File(mBaseStateDir, transport.transportDirName()); + File pmState = new File(stateDir, PACKAGE_MANAGER_SENTINEL); + if (pmState.length() <= 0) { + Slog.i(TAG, "Full backup requested but dataset not yet initialized " + + "via k/v backup pass; ignoring"); + return; + } + // Set up to send data to the transport final int N = mPackages.size(); for (int i = 0; i < N; i++) { |