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

Commit cc3f1e7e authored by Mohammad Samiul Islam's avatar Mohammad Samiul Islam Committed by Android (Google) Code Review
Browse files

Merge "Rebrand the term "rollback" to "revert" for apexd"

parents 32e02950 2dfc86af
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -565,12 +565,12 @@ abstract class ApexManager {
                        ipw.println("State: ACTIVATION FAILED");
                    } else if (si.isSuccess) {
                        ipw.println("State: SUCCESS");
                    } else if (si.isRollbackInProgress) {
                        ipw.println("State: ROLLBACK IN PROGRESS");
                    } else if (si.isRolledBack) {
                        ipw.println("State: ROLLED BACK");
                    } else if (si.isRollbackFailed) {
                        ipw.println("State: ROLLBACK FAILED");
                    } else if (si.isRevertInProgress) {
                        ipw.println("State: REVERT IN PROGRESS");
                    } else if (si.isReverted) {
                        ipw.println("State: REVERTED");
                    } else if (si.isRevertFailed) {
                        ipw.println("State: REVERT FAILED");
                    }
                    ipw.decreaseIndent();
                }
+5 −5
Original line number Diff line number Diff line
@@ -665,15 +665,15 @@ public class StagingManager {
    private boolean isApexSessionFinalized(ApexSessionInfo session) {
        /* checking if the session is in a final state, i.e., not active anymore */
        return session.isUnknown || session.isActivationFailed || session.isSuccess
                || session.isRolledBack;
                || session.isReverted;
    }

    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.
        // isRevertInProgress is included to cover the scenario, when a device is rebooted
        // during the revert, and apexd fails to resume the revert after reboot.
        return apexSessionInfo.isActivationFailed || apexSessionInfo.isUnknown
                || apexSessionInfo.isRolledBack || apexSessionInfo.isRollbackInProgress
                || apexSessionInfo.isRollbackFailed;
                || apexSessionInfo.isReverted || apexSessionInfo.isRevertInProgress
                || apexSessionInfo.isRevertFailed;
    }

    @GuardedBy("mStagedSessions")