Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f2f4135 authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't hang in restore if the transport reports failure

Casualty of the recent refactoring: in this particular error case,
the restore sequence wasn't being directed into the finalization
state.  Fixes bug 5336295.

Change-Id: Ibf5570cd1003e123da8b561685de8479663340ce
parent 61b645ab
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4372,8 +4372,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;
                }