platform_bootable_recovery/otautil
Tao Bao 6798315327 otautil: Remove the aborts in RangeSet::Parse().
We used to CHECK and abort on parsing errors. While it works fine for
the updater use case (because recovery starts updater in a forked
process and collects the process exit code), it's difficult for other
clients to use RangeSet as a library (e.g. update_verifier).

This CL switches the aborts to returning empty RangeSet instead. Callers
need to check the parsing results explicitly.

The CL also separates RangeSet::PushBack() into a function, and moves
SortedRangeSet::Clear() into RangeSet.

Test: recovery_unit_test
Test: Sideload an OTA package with the new updater on angler.
Test: Sideload an OTA package with injected range string errors. The
      updater aborts from the explicit checks.
Change-Id: If2b7f6f41dc93af917a21c7877a83e98dc3fd016
2017-11-07 12:50:02 -08:00
..
include/otautil otautil: Remove the aborts in RangeSet::Parse(). 2017-11-07 12:50:02 -08:00
Android.bp otautil: Move RangeSet implementation into rangeset.cpp. 2017-10-16 11:28:18 -07:00
DirUtil.cpp otautil: Export headers. 2017-10-03 14:41:32 -07:00
rangeset.cpp otautil: Remove the aborts in RangeSet::Parse(). 2017-11-07 12:50:02 -08:00
SysUtil.cpp otautil: #include <errno.h> for TEMP_FAILURE_RETRY. 2017-10-11 12:15:49 -07:00
ThermalUtil.cpp otautil: Export headers. 2017-10-03 14:41:32 -07:00