Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 773fe764 authored by David Anderson's avatar David Anderson
Browse files

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
parent 64d68e1d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment