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
This commit is contained in:
Christopher Tate
2015-08-17 12:16:19 -07:00
parent ed7961eb5a
commit d71d7c350c

View File

@@ -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);
}
}