Snap for 12623742 from 387cd624b39cd7eaa911d2df820c37f4cc8e697c to 25Q1-release
Change-Id: I442a7e17243f402d15a4b459716cd1b4e5f7e962
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc
index 6b05603..9f7ec97 100644
--- a/aosp/update_attempter_android.cc
+++ b/aosp/update_attempter_android.cc
@@ -506,6 +506,10 @@
"Status reset not allowed in this state, please "
"cancel on going OTA first.");
}
+ // last_error_ is used by setShouldSwitchSlot to determine if
+ // FilesystemVerification is done. Since we are discarding update
+ // state, discard this cache as well.
+ last_error_ = ErrorCode::kSuccess;
if (apex_handler_android_ != nullptr) {
LOG(INFO) << "Cleaning up reserved space for compressed APEX (if any)";
@@ -1339,6 +1343,9 @@
// Don't run postinstall, we just need PostinstallAction to switch the slots.
install_plan_.run_post_install = false;
install_plan_.is_resume = true;
+ // previous ApplyPayload() call may have requested powerwash, these
+ // settings would be saved in `this->install_plan_`. Inherit that setting.
+ install_plan_.powerwash_required = this->install_plan_.powerwash_required;
CHECK_NE(install_plan_.source_slot, UINT32_MAX);
CHECK_NE(install_plan_.target_slot, UINT32_MAX);