CleanupPreviousUpdateAction: refactor and add StopActionInternal
Add a new function, StopActionInternal, that stops the action.
Also refactor and let all public *Action APIs call one of Start or
Stop.
Test: pass
Bug: 169436297
Change-Id: I04877426f87f12755f9e3ba17434a4514941df99
diff --git a/cleanup_previous_update_action.h b/cleanup_previous_update_action.h
index 6f6ce07..1d8d3d7 100644
--- a/cleanup_previous_update_action.h
+++ b/cleanup_previous_update_action.h
@@ -75,6 +75,7 @@
unsigned int last_percentage_{0};
android::snapshot::ISnapshotMergeStats* merge_stats_;
+ void StopActionInternal();
void StartActionInternal();
void ScheduleWaitBootCompleted();
void WaitBootCompletedOrSchedule();