DynamicPartitionControl: only create snapshot when snapshot_enabled

Do not create snapshot when applying downgrade
to non-Virtual-A/B packages and secondary OTAs.

Test: apply downgrade OTA on Virtual A/B devices

Bug: 138733621 (secondary OTA)
Fixes: 138258570 (downgrades)

Change-Id: I13318f57613d6bd60a5b7e81ebb3e35b3c225a0c
diff --git a/mock_dynamic_partition_control.h b/mock_dynamic_partition_control.h
index 1af6cfe..8146e0f 100644
--- a/mock_dynamic_partition_control.h
+++ b/mock_dynamic_partition_control.h
@@ -44,8 +44,8 @@
                    const std::string&, uint32_t));
   MOCK_METHOD1(GetDeviceDir, bool(std::string*));
   MOCK_METHOD0(GetDynamicPartitionsFeatureFlag, FeatureFlag());
-  MOCK_METHOD3(PreparePartitionsForUpdate,
-               bool(uint32_t, uint32_t, const DeltaArchiveManifest&));
+  MOCK_METHOD4(PreparePartitionsForUpdate,
+               bool(uint32_t, uint32_t, const DeltaArchiveManifest&, bool));
   MOCK_METHOD1(GetSuperPartitionName, std::string(uint32_t));
   MOCK_METHOD0(GetVirtualAbFeatureFlag, FeatureFlag());
   MOCK_METHOD0(FinishUpdate, bool());