Don't FinishUpdate() in BootControl*::SetActiveBootSlot() am: e858362209
am: ca8f1feaf2

Change-Id: I719adaec00c12c21af62593a3736aa89535885f4
diff --git a/boot_control_android.cc b/boot_control_android.cc
index 9f736b7..429de6a 100644
--- a/boot_control_android.cc
+++ b/boot_control_android.cc
@@ -120,10 +120,6 @@
 }
 
 bool BootControlAndroid::SetActiveBootSlot(Slot slot) {
-  if (slot != GetCurrentSlot() && !dynamic_control_->FinishUpdate()) {
-    return false;
-  }
-
   CommandResult result;
   auto ret = module_->setActiveBootSlot(slot, StoreResultCallback(&result));
   if (!ret.isOk()) {
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 {