Mark current slot successful after cancelling an update.
When cancelling an update that was completed and pending reboot, we
need to rollback the "SetActiveSlot(the_other_slot)" action performed
when the update was applied. We used to just mark the current slot as
active, which should switch the priorities to make the current slot the
priority one.
This patch also marks the current slot as successful after marking it as
active since the action of marking a slot as active in the HAL might
reset the successful bit. The current slot must have already been marked
as successful because an update was applied, so this wouldn't mark a bad
slot successful.
Bug: 33102712
Test: Manual test: deployed an update, cancelled it with --reset_status
and checked that the current slot is still marked as successful.
Change-Id: I0e3296446e811b5efbee7791565710fc1fa3a8dd
2 files changed