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

Commit 4f0a1e36 authored by Alex Kershaw's avatar Alex Kershaw Committed by android-build-merger
Browse files

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

am: d76033fd

Change-Id: I4f5fb3bc5418d616e4b8ef35023eb5086e4d58a1
parents 09056956 d76033fd
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -194,8 +194,17 @@ class AbUpdateInstaller extends UpdateInstaller {
        }

        UpdateEngine updateEngine = buildBoundUpdateEngine();
        try {
            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 {