Merge "Catch exceptions thrown from UpdateEngine#applyPayload." into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d76033fd24
@@ -194,8 +194,17 @@ class AbUpdateInstaller extends UpdateInstaller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateEngine updateEngine = buildBoundUpdateEngine();
|
UpdateEngine updateEngine = buildBoundUpdateEngine();
|
||||||
updateEngine.applyPayload(
|
try {
|
||||||
updatePath, mOffsetForUpdate, mSizeForUpdate, headerKeyValuePairs);
|
updateEngine.applyPayload(
|
||||||
|
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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user