From 0cf1acbbdc2d8b75704f5799713f81b33ff00e3c Mon Sep 17 00:00:00 2001 From: Miriam Polzer Date: Wed, 29 Apr 2020 17:39:51 +0200 Subject: update_engine: Add powerwash flag to update status Add a powerwash flag to the update status which is set to true if and only if a powerwash takes place. This will ensure that the user is informed of a pending powerwash exactly when it is going to happen. BUG=chromium:1070563 TEST=FEATURES=test emerge-amd64-generic update_engine channel change and update on test device Cq-Depend: chromium:2187671 Change-Id: I58314ecc7c9c2e64c906ef5b31cb780948196296 Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2187672 Reviewed-by: Jae Hoon Kim Reviewed-by: Amin Hassani Tested-by: Miriam Polzer Commit-Queue: Miriam Polzer --- update_status_utils.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'update_status_utils.cc') diff --git a/update_status_utils.cc b/update_status_utils.cc index f88bb1aa..6c618eca 100644 --- a/update_status_utils.cc +++ b/update_status_utils.cc @@ -38,6 +38,7 @@ const char kLastCheckedTime[] = "LAST_CHECKED_TIME"; const char kNewSize[] = "NEW_SIZE"; const char kNewVersion[] = "NEW_VERSION"; const char kProgress[] = "PROGRESS"; +const char kWillPowerwashAfterReboot[] = "WILL_POWERWASH_AFTER_REBOOT"; } // namespace @@ -84,6 +85,8 @@ string UpdateEngineStatusToString(const UpdateEngineStatus& status) { key_value_store.SetBoolean(kIsEnterpriseRollback, status.is_enterprise_rollback); key_value_store.SetBoolean(kIsInstall, status.is_install); + key_value_store.SetBoolean(kWillPowerwashAfterReboot, + status.will_powerwash_after_reboot); return key_value_store.SaveToString(); } -- cgit v1.2.3