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

Commit fb6688e3 authored by Nikita Ioffe's avatar Nikita Ioffe
Browse files

Fail staged session if apexd session is in ROLLBACK_IN_PROGRESS state

This covers a (very unlikely) scenario, in which device was rebooted
during apexd rollback, and apexd wasn't able to resume rollback after
the reboot.

For a tiny bit more context see: aosp/912794

Bug: 123622800
Test: none
Change-Id: Idbb142dce2dbc85b818ba42e93ab107e4955301d
parent 750c23d5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -491,8 +491,10 @@ public class StagingManager {
    }

    private static boolean isApexSessionFailed(ApexSessionInfo apexSessionInfo) {
        // isRollbackInProgress is included to cover the scenario, when a device is rebooted in
        // during the rollback, and apexd fails to resume the rollback after reboot.
        return apexSessionInfo.isActivationFailed || apexSessionInfo.isUnknown
                || apexSessionInfo.isRolledBack;
                || apexSessionInfo.isRolledBack || apexSessionInfo.isRollbackInProgress;
    }

    @GuardedBy("mStagedSessions")