Remove unused field save_rollback_data am: 399bd4dae1 am: 99f428ff1e
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/3391041
Change-Id: I0dfaeff40684d44e552126296f37bd0e9e392d17
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/aosp/hardware_android.cc b/aosp/hardware_android.cc
index 29d742f..dd39fdd 100644
--- a/aosp/hardware_android.cc
+++ b/aosp/hardware_android.cc
@@ -213,10 +213,8 @@
return 0;
}
-bool HardwareAndroid::SchedulePowerwash(bool save_rollback_data) {
+bool HardwareAndroid::SchedulePowerwash() {
LOG(INFO) << "Scheduling a powerwash to BCB.";
- LOG_IF(WARNING, save_rollback_data) << "save_rollback_data was true but "
- << "isn't supported.";
string err;
if (!update_bootloader_message({"--wipe_data", "--reason=wipe_data_from_ota"},
&err)) {
diff --git a/aosp/hardware_android.h b/aosp/hardware_android.h
index cb655c9..b071e06 100644
--- a/aosp/hardware_android.h
+++ b/aosp/hardware_android.h
@@ -18,13 +18,11 @@
#define UPDATE_ENGINE_AOSP_HARDWARE_ANDROID_H_
#include <string>
-#include <string_view>
#include <android-base/macros.h>
#include <base/time/time.h>
#include "update_engine/common/error_code.h"
-#include "update_engine/common/hardware.h"
#include "update_engine/common/hardware_interface.h"
namespace chromeos_update_engine {
@@ -49,7 +47,7 @@
bool SetMaxFirmwareKeyRollforward(int firmware_max_rollforward) override;
bool SetMaxKernelKeyRollforward(int kernel_max_rollforward) override;
int GetPowerwashCount() const override;
- bool SchedulePowerwash(bool save_rollback_data) override;
+ bool SchedulePowerwash() override;
bool CancelPowerwash() override;
bool GetNonVolatileDirectory(base::FilePath* path) const override;
bool GetPowerwashSafeDirectory(base::FilePath* path) const override;
diff --git a/common/fake_hardware.h b/common/fake_hardware.h
index 6c25183..3b68958 100644
--- a/common/fake_hardware.h
+++ b/common/fake_hardware.h
@@ -107,15 +107,13 @@
int GetPowerwashCount() const override { return powerwash_count_; }
- bool SchedulePowerwash(bool save_rollback_data) override {
+ bool SchedulePowerwash() override {
powerwash_scheduled_ = true;
- save_rollback_data_ = save_rollback_data;
return true;
}
bool CancelPowerwash() override {
powerwash_scheduled_ = false;
- save_rollback_data_ = false;
return true;
}
diff --git a/common/hardware_interface.h b/common/hardware_interface.h
index 4e820f1..1b146d1 100644
--- a/common/hardware_interface.h
+++ b/common/hardware_interface.h
@@ -100,9 +100,8 @@
virtual int GetPowerwashCount() const = 0;
// Signals that a powerwash (stateful partition wipe) should be performed
- // after reboot. If |save_rollback_data| is true additional state is
- // preserved during shutdown that can be restored after the powerwash.
- virtual bool SchedulePowerwash(bool save_rollback_data) = 0;
+ // after reboot.
+ virtual bool SchedulePowerwash() = 0;
// Cancel the powerwash operation scheduled to be performed on next boot.
virtual bool CancelPowerwash() = 0;
diff --git a/common/test_utils.h b/common/test_utils.h
index b85f80d..2a582b1 100644
--- a/common/test_utils.h
+++ b/common/test_utils.h
@@ -175,7 +175,7 @@
// This is a simple Action class for testing. It feeds an object into
// another action.
template <typename T>
-class ObjectFeederAction : public Action<ObjectFeederAction<T>> {
+class ObjectFeederAction final : public Action<ObjectFeederAction<T>> {
public:
typedef NoneType InputObjectType;
typedef T OutputObjectType;
diff --git a/payload_consumer/install_plan.cc b/payload_consumer/install_plan.cc
index b55dea1..8916af5 100644
--- a/payload_consumer/install_plan.cc
+++ b/payload_consumer/install_plan.cc
@@ -98,8 +98,6 @@
{"powerwash_required", utils::ToString(powerwash_required)},
{"switch_slot_on_reboot", utils::ToString(switch_slot_on_reboot)},
{"run_post_install", utils::ToString(run_post_install)},
- {"rollback_data_save_requested",
- utils::ToString(rollback_data_save_requested)},
{"write_verity", utils::ToString(write_verity)},
},
"\n"));
diff --git a/payload_consumer/install_plan.h b/payload_consumer/install_plan.h
index 04f6667..e1c2c34 100644
--- a/payload_consumer/install_plan.h
+++ b/payload_consumer/install_plan.h
@@ -182,9 +182,6 @@
// False otherwise.
bool run_post_install{true};
- // True if this rollback should preserve some system data.
- bool rollback_data_save_requested{false};
-
// True if the update should write verity.
// False otherwise.
bool write_verity{true};
diff --git a/payload_consumer/install_plan_unittest.cc b/payload_consumer/install_plan_unittest.cc
index d2a3f5f..ca54360 100644
--- a/payload_consumer/install_plan_unittest.cc
+++ b/payload_consumer/install_plan_unittest.cc
@@ -54,7 +54,6 @@
powerwash_required: false
switch_slot_on_reboot: true
run_post_install: true
-rollback_data_save_requested: false
write_verity: true
Partition: foo-partition_name
source_size: 0
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index 02417be..5a6eeab 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -127,8 +127,7 @@
// that retains a small amount of system state such as enrollment and
// network configuration. In both cases all user accounts are deleted.
if (install_plan_.powerwash_required) {
- if (hardware_->SchedulePowerwash(
- install_plan_.rollback_data_save_requested)) {
+ if (hardware_->SchedulePowerwash()) {
powerwash_scheduled_ = true;
} else {
return CompletePostinstall(ErrorCode::kPostinstallPowerwashError);
diff --git a/payload_consumer/postinstall_runner_action.h b/payload_consumer/postinstall_runner_action.h
index 6017069..1a3cdf6 100644
--- a/payload_consumer/postinstall_runner_action.h
+++ b/payload_consumer/postinstall_runner_action.h
@@ -26,7 +26,6 @@
#include <brillo/message_loops/message_loop.h>
#include <gtest/gtest_prod.h>
-#include "update_engine/common/action.h"
#include "update_engine/common/boot_control_interface.h"
#include "update_engine/common/hardware_interface.h"
#include "update_engine/payload_consumer/install_plan.h"
diff --git a/payload_consumer/postinstall_runner_action_unittest.cc b/payload_consumer/postinstall_runner_action_unittest.cc
index 9eab1c1..028402a 100644
--- a/payload_consumer/postinstall_runner_action_unittest.cc
+++ b/payload_consumer/postinstall_runner_action_unittest.cc
@@ -198,7 +198,6 @@
install_plan.partitions = {part};
install_plan.download_url = "http://127.0.0.1:8080/update";
install_plan.powerwash_required = powerwash_required;
- install_plan.rollback_data_save_requested = save_rollback_data;
RunPostinstallActionWithInstallPlan(install_plan);
}