Skip to content

Commit 7462251

Browse files
Christopher TateAndroid (Google) Code Review
authored andcommitted
Merge "Don't hang in restore if the transport reports failure" into ics-factoryrom
2 parents a200a23 + 5f2f413 commit 7462251

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

services/java/com/android/server/BackupManagerService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4372,8 +4372,13 @@ void initiateOneRestore(PackageInfo app, int appVersionCode, IBackupAgent agent,
43724372
ParcelFileDescriptor.MODE_TRUNCATE);
43734373

43744374
if (mTransport.getRestoreData(mBackupData) != BackupConstants.TRANSPORT_OK) {
4375+
// Transport-level failure, so we wind everything up and
4376+
// terminate the restore operation.
43754377
Slog.e(TAG, "Error getting restore data for " + packageName);
43764378
EventLog.writeEvent(EventLogTags.RESTORE_TRANSPORT_FAILURE);
4379+
mBackupData.close();
4380+
mBackupDataName.delete();
4381+
executeNextState(RestoreState.FINAL);
43774382
return;
43784383
}
43794384

0 commit comments

Comments
 (0)