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/cleanup_previous_update_action.cc b/aosp/cleanup_previous_update_action.cc
index 7b0c9bb..fb7bac1 100644
--- a/aosp/cleanup_previous_update_action.cc
+++ b/aosp/cleanup_previous_update_action.cc
@@ -379,7 +379,10 @@
}
bool CleanupPreviousUpdateAction::BeforeCancel() {
- if (DeltaPerformer::ResetUpdateProgress(prefs_, false /* quick */)) {
+ if (DeltaPerformer::ResetUpdateProgress(
+ prefs_,
+ false /* quick */,
+ false /* skip dynamic partitions metadata*/)) {
return true;
}