Fix merge in sideload
For UpdateAttempterAndroid:
- In sideload, ApplyPayload is immediately called after
UpdateAttempterAndroid::Init(), and errors out because
ScheduleCleanupPreviousUpdate starts the ActionProcessor. Do not
call it in sideload since ApplyPayload schedules a
CleanupPreviousUpdateAction too.
- Also fixes TerminateUpdateAndNotify in sideload if it errors at
CleanupPreviousUpdateAction.
For CleanupPreviousUpdateAction:
- Don't wait for boot_completed and slot verification in sideload.
- Ensure metadata is mounted.
Fixes: 151640692
Test: sideload
Change-Id: Ib91b208d3f8d79285b9a87a44410a575bd2da42e
Merged-In: Ib91b208d3f8d79285b9a87a44410a575bd2da42e
diff --git a/cleanup_previous_update_action.h b/cleanup_previous_update_action.h
index 7b1586c..91e08b0 100644
--- a/cleanup_previous_update_action.h
+++ b/cleanup_previous_update_action.h
@@ -69,6 +69,7 @@
BootControlInterface* boot_control_;
android::snapshot::SnapshotManager* snapshot_;
CleanupPreviousUpdateActionDelegateInterface* delegate_;
+ std::unique_ptr<android::snapshot::AutoDevice> metadata_device_;
bool running_{false};
bool cancel_failed_{false};
unsigned int last_percentage_{0};