diff options
author | Christopher Tate <ctate@google.com> | 2015-08-17 12:16:19 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2015-08-17 12:16:19 -0700 |
commit | d71d7c350c76d3494dd6688c26a837fa41ea18f8 (patch) | |
tree | 706975fe76d5ee045b3ebf6b953ffd97581b6d4c /services | |
parent | ed7961eb5a1fceabf30a8f790c8dc37ae714db51 (diff) | |
download | frameworks_base-d71d7c350c76d3494dd6688c26a837fa41ea18f8.zip frameworks_base-d71d7c350c76d3494dd6688c26a837fa41ea18f8.tar.gz frameworks_base-d71d7c350c76d3494dd6688c26a837fa41ea18f8.tar.bz2 |
Clean up properly if outcall for doRestoreFinished() fails
The target app crashed at an inopportune time but this shouldn't
invalidate the whole ongoing restore operation; it's a problem local to
the specific app undergoing restore. Recognize this, clean up the app's
possibly-incomplete data, and continue running the restore queue as
planned.
Bug 23228982
Change-Id: If9a19d2fe6a0ce5339c893630d7a61a5a5ccd9b1
Diffstat (limited to 'services')
-rw-r--r-- | services/backup/java/com/android/server/backup/BackupManagerService.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java index 83b953e..8d9c965 100644 --- a/services/backup/java/com/android/server/backup/BackupManagerService.java +++ b/services/backup/java/com/android/server/backup/BackupManagerService.java @@ -7848,8 +7848,12 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF // If we get this far, the callback or timeout will schedule the // next restore state, so we're done } catch (Exception e) { - Slog.e(TAG, "Unable to finalize restore of " + mCurrentPackage.packageName); - executeNextState(UnifiedRestoreState.FINAL); + final String packageName = mCurrentPackage.packageName; + Slog.e(TAG, "Unable to finalize restore of " + packageName); + EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, + packageName, e.toString()); + keyValueAgentErrorCleanup(); + executeNextState(UnifiedRestoreState.RUNNING_QUEUE); } } |