Merge "Catch exceptions thrown from UpdateEngine#applyPayload." into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-15 11:01:49 +00:00
committed by Android (Google) Code Review

View File

@@ -194,8 +194,17 @@ class AbUpdateInstaller extends UpdateInstaller {
} }
UpdateEngine updateEngine = buildBoundUpdateEngine(); UpdateEngine updateEngine = buildBoundUpdateEngine();
try {
updateEngine.applyPayload( updateEngine.applyPayload(
updatePath, mOffsetForUpdate, mSizeForUpdate, headerKeyValuePairs); updatePath, mOffsetForUpdate, mSizeForUpdate, headerKeyValuePairs);
} catch (Exception e) {
// Prevent an automatic restart when an update is already being processed
// (http://b/124106342).
Log.w(UpdateInstaller.TAG, "Failed to install update from file.", e);
notifyCallbackOnError(
InstallSystemUpdateCallback.UPDATE_ERROR_UNKNOWN,
"Failed to install update from file.");
}
} }
private boolean updateStateForPayload() throws IOException { private boolean updateStateForPayload() throws IOException {