diff options
| author | 2016-06-09 16:28:26 -0700 | |
|---|---|---|
| committer | 2016-06-09 16:28:26 -0700 | |
| commit | 09893e9a4157f77938a0f688d17476df8be9441a (patch) | |
| tree | 1a8615066b137ea9065e7e4954f5a958496e8987 | |
| parent | 142fc425c472eb7a948c0eed37aa7b4b80740a8c (diff) | |
Don't allow restore sessions during backups
Gracefully no-op if apps attempt to restore themselves while there is
a backup pass in flight.
Bug 29135379
Change-Id: I8f0b5cd9d149b703e1de7a3a0b4b54c3aff766b6
| -rw-r--r-- | services/backup/java/com/android/server/backup/BackupManagerService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java index acc2ec30d67f..334b228a4ab7 100644 --- a/services/backup/java/com/android/server/backup/BackupManagerService.java +++ b/services/backup/java/com/android/server/backup/BackupManagerService.java @@ -9849,7 +9849,11 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF synchronized(this) { if (mActiveRestoreSession != null) { - Slog.d(TAG, "Restore session requested but one already active"); + Slog.i(TAG, "Restore session requested but one already active"); + return null; + } + if (mBackupRunning) { + Slog.i(TAG, "Restore session requested but currently running backups"); return null; } mActiveRestoreSession = new ActiveRestoreSession(packageName, transport); |