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/aosp/dynamic_partition_control_android.cc b/aosp/dynamic_partition_control_android.cc
index ca3473c..19ea6ec 100644
--- a/aosp/dynamic_partition_control_android.cc
+++ b/aosp/dynamic_partition_control_android.cc
@@ -1314,8 +1314,8 @@
// ResetUpdateProgress may pass but CancelUpdate fails.
// This is expected. A scheduled CleanupPreviousUpdateAction should free
// space when it is done.
- TEST_AND_RETURN_FALSE(
- DeltaPerformer::ResetUpdateProgress(prefs, false /* quick */));
+ TEST_AND_RETURN_FALSE(DeltaPerformer::ResetUpdateProgress(
+ prefs, false /* quick */, false /* skip dynamic partitions metadata */));
if (ExpectMetadataMounted()) {
TEST_AND_RETURN_FALSE(snapshot_->CancelUpdate());