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

Commit 34ec3f10 authored by Richard Uhler's avatar Richard Uhler
Browse files

Don't special case for non-apex staged sessions.

So that we can reuse the existing call into rollback manager when
rollback is enabled.

Bug: 124221060
Test: adb install --staged file.apk
Test: adb install file.apex
Test: adb install-multi-package --staged file.apk
Test: adb install-multi-package file.apex
Test: adb install-multi-package file.apk file.apex
Test: atest StagedRollbackTest (test currently under development).
Change-Id: I8e8e417db11d07dd7404318240ee16235061ab4d
parent 7a8c08a8
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -156,12 +156,8 @@ public class StagingManager {
        boolean success = true;

        // STOPSHIP: TODO(b/123753157): Verify APKs through Package Verifier.
        if (!sessionContainsApex(session)) {
        // TODO: Decide whether we want to fail fast by detecting signature mismatches for APKs,
        // right away.
            session.setStagedSessionReady();
            return;
        }

        final ApexInfoList apexInfoList = new ApexInfoList();
        // APEX checks. For single-package sessions, check if they contain an APEX. For
@@ -227,7 +223,8 @@ public class StagingManager {
        }

        session.setStagedSessionReady();
        if (!mApexManager.markStagedSessionReady(session.sessionId)) {
        if (sessionContainsApex(session)
                && !mApexManager.markStagedSessionReady(session.sessionId)) {
            session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_VERIFICATION_FAILED,
                            "APEX staging failed, check logcat messages from apexd for more "
                            + "details.");