Rebrand the term "rollback" to "revert" for apexd
StagingManager is a client of apexd. Rebrand in apexd requires we make
similar changes in StagingManager.
Bug: 144831762
Test: Builds without error
Change-Id: Idf2104e76a89bd8cd08778ca53129377255031af
diff --git a/services/core/java/com/android/server/pm/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java
index fc87acb..44c36ee0 100644
--- a/services/core/java/com/android/server/pm/ApexManager.java
+++ b/services/core/java/com/android/server/pm/ApexManager.java
@@ -565,12 +565,12 @@
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();
}
diff --git a/services/core/java/com/android/server/pm/StagingManager.java b/services/core/java/com/android/server/pm/StagingManager.java
index 00b5257..3390ca7 100644
--- a/services/core/java/com/android/server/pm/StagingManager.java
+++ b/services/core/java/com/android/server/pm/StagingManager.java
@@ -665,15 +665,15 @@
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")