Clean up update state when snapshots are interrupted or cancelled.
This patch addresses two edge cases with interrupted updates: (1) If the device reverts to the old slot *before* merging, snapshots must be removed. (2) If during a merge, a snapshot is detected to be invalid (due to flashing), the snapshot must be removed. To encapsulate this logic, WaitForMerge has been renamed to ProcessUpdateState. It is still intended to be called after /data is mounted, or after a merge is initiated. Bug: 139154795 Test: libsnapshot_test gtest Change-Id: I37a25ca722f30ae9548894dcfbd70cb64330e416
Loading
Please register or sign in to comment