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 <kimjae@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Miriam Polzer <mpolzer@google.com>
Commit-Queue: Miriam Polzer <mpolzer@google.com>
diff --git a/client_library/client_dbus.cc b/client_library/client_dbus.cc
index 5ca519a..8e9a7fd 100644
--- a/client_library/client_dbus.cc
+++ b/client_library/client_dbus.cc
@@ -56,6 +56,8 @@
out_status->is_enterprise_rollback = status.is_enterprise_rollback();
out_status->is_install = status.is_install();
out_status->eol_date = status.eol_date();
+ out_status->will_powerwash_after_reboot =
+ status.will_powerwash_after_reboot();
}
} // namespace
diff --git a/client_library/include/update_engine/update_status.h b/client_library/include/update_engine/update_status.h
index c1d0968..b1cf1f8 100644
--- a/client_library/include/update_engine/update_status.h
+++ b/client_library/include/update_engine/update_status.h
@@ -90,6 +90,8 @@
bool is_install;
// The end-of-life date of the device in the number of days since Unix Epoch.
int64_t eol_date;
+ // The system will powerwash once the update is applied.
+ bool will_powerwash_after_reboot;
};
} // namespace update_engine