Loading
Ensure CancelUpdate() always works in recovery.
This adds a new helper function, TryCancelUpdate(), and refactors the update cancellation logic. It now takes a "force" parameter, which if is set and the device is in recovery, overrides all conditions that would cause cancellation to fail. In addition the cancellation logic has been consolidated to avoid duplication of code and error checks. Removal of invalid snapshots is now automatic for all success cases. Test: vts_libsnapshot_test Bug: 352538505 Change-Id: I612d4eb3c4f6436838c9b2f1e38bf644e99c6ad0