am 7462251b: Merge "Don\'t hang in restore if the transport reports failure" into ics-factoryrom

* commit '7462251b0a3f2601236b599bcabf54451143b704':
  Don't hang in restore if the transport reports failure
This commit is contained in:
Christopher Tate
2011-09-26 20:40:56 -07:00
committed by Android Git Automerger

View File

@@ -4374,8 +4374,13 @@ class BackupManagerService extends IBackupManager.Stub {
ParcelFileDescriptor.MODE_TRUNCATE);
if (mTransport.getRestoreData(mBackupData) != BackupConstants.TRANSPORT_OK) {
// Transport-level failure, so we wind everything up and
// terminate the restore operation.
Slog.e(TAG, "Error getting restore data for " + packageName);
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
mBackupData.close();
mBackupDataName.delete();
executeNextState(RestoreState.FINAL);
return;
}