Allow forward merge on powerwash.

If package schedules powerwash, snapshots on a Virtual A/B device
will be deleted. Tell SnapshotManager to handle this case.

Test: apply downgrade package
Test: apply package with wipe
Test: apply package then manually wipe
Bug: 152094219
Change-Id: I8601b661924abcc82956788e2f33cdb70d71f778
diff --git a/common/dynamic_partition_control_interface.h b/common/dynamic_partition_control_interface.h
index d5db9bc..58ebfe4 100644
--- a/common/dynamic_partition_control_interface.h
+++ b/common/dynamic_partition_control_interface.h
@@ -87,7 +87,7 @@
 
   // After writing to new partitions, before rebooting into the new slot, call
   // this function to indicate writes to new partitions are done.
-  virtual bool FinishUpdate() = 0;
+  virtual bool FinishUpdate(bool powerwash_required) = 0;
 
   // Get an action to clean up previous update.
   // Return NoOpAction on non-Virtual A/B devices.
diff --git a/common/dynamic_partition_control_stub.cc b/common/dynamic_partition_control_stub.cc
index 1239eab..903b7ee 100644
--- a/common/dynamic_partition_control_stub.cc
+++ b/common/dynamic_partition_control_stub.cc
@@ -51,7 +51,7 @@
   return true;
 }
 
-bool DynamicPartitionControlStub::FinishUpdate() {
+bool DynamicPartitionControlStub::FinishUpdate(bool powerwash_required) {
   return true;
 }
 
diff --git a/common/dynamic_partition_control_stub.h b/common/dynamic_partition_control_stub.h
index 679d028..d8e254e 100644
--- a/common/dynamic_partition_control_stub.h
+++ b/common/dynamic_partition_control_stub.h
@@ -40,7 +40,7 @@
                                   bool update,
                                   uint64_t* required_size) override;
 
-  bool FinishUpdate() override;
+  bool FinishUpdate(bool powerwash_required) override;
   std::unique_ptr<AbstractAction> GetCleanupPreviousUpdateAction(
       BootControlInterface* boot_control,
       PrefsInterface* prefs,