Don't FinishUpdate() in BootControl*::SetActiveBootSlot()
Instead, callers call GetDynamicPartitionControl()->FinishUpdate()
directly.
This is one more step forward for keeping BootControlAndroid a thin
wrapper over the boot control HAL.
Test: builds
Test: update_engine_unittests
Change-Id: I95773ed7f230d1a666d5391bec7783e42b90bf64
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index a782b8f..1367649 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -339,7 +339,8 @@
// steps succeeded.
if (error_code == ErrorCode::kSuccess) {
if (install_plan_.switch_slot_on_reboot) {
- if (!boot_control_->SetActiveBootSlot(install_plan_.target_slot)) {
+ if (!boot_control_->GetDynamicPartitionControl()->FinishUpdate() ||
+ !boot_control_->SetActiveBootSlot(install_plan_.target_slot)) {
error_code = ErrorCode::kPostinstallRunnerError;
}
} else {