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

This commit is contained in:
Mohammad Samiul Islam
2019-11-21 18:10:52 +00:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 11 deletions

View File

@@ -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();
}

View File

@@ -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")