Cleanup DAP state before installing new OTA am: 42c2d55eb6

Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2164380

Change-Id: I833e47823ffbdbeea54374b3b806f15f498e2264
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc
index a3485ea..1d35b5e 100644
--- a/aosp/update_attempter_android.cc
+++ b/aosp/update_attempter_android.cc
@@ -263,6 +263,7 @@
   install_plan_.is_resume = !payload_id.empty() &&
                             DeltaPerformer::CanResumeUpdate(prefs_, payload_id);
   if (!install_plan_.is_resume) {
+    boot_control_->GetDynamicPartitionControl()->Cleanup();
     // No need to reset dynamic_partititon_metadata_updated. If previous calls
     // to AllocateSpaceForPayload uses the same payload_id, reuse preallocated
     // space. Otherwise, DeltaPerformer re-allocates space when the payload is