Remove unused field save_rollback_data
save_rollback_data is inherited from ChromeOS to persist data
after a data wipe. Android never supported this feature, remove
unused code.
Test: th
Bug: 377557752
Change-Id: I022577bb19cd27010ffe0236b2659fe7880f03c4
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);
}