Revert ResetUpdateProgress behavior
Have ResetUpdateProgress not delete
kPrefsDynamicPartitionMetadataUpdated so update-engine won't prepare a
snapshot twice in the case that we call allocateSpaceForPayload()
followed by ApplyPayload() on a no-resume install
Test: m update_engine
Bug: 285504009
Change-Id: I5e3cd5cc06b6b0db9ebef5e6192878f0254381ee
diff --git a/payload_consumer/delta_performer.h b/payload_consumer/delta_performer.h
index ce37bd1..2616b6e 100644
--- a/payload_consumer/delta_performer.h
+++ b/payload_consumer/delta_performer.h
@@ -147,7 +147,10 @@
// If |skip_dynamic_partititon_metadata_updated| is true, do not reset
// dynamic-partition-metadata-updated.
// Returns true on success, false otherwise.
- static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick);
+ static bool ResetUpdateProgress(
+ PrefsInterface* prefs,
+ bool quick,
+ bool skip_dynamic_partititon_metadata_updated = false);
// Attempts to parse the update metadata starting from the beginning of
// |payload|. On success, returns kMetadataParseSuccess. Returns