install: Return bool for a few check functions.

The results from these functions have boolean semantics. They're
returning `int` prior to this CL, with some of them mixing 0 and
InstallResult.  Note that SetUpNonAbUpdateCommands() was returning
INSTALL_CORRUPT / INSTALL_ERROR / 0 prior to this change, but all the
callers handle INSTALL_CORRUPT and INSTALL_ERROR the same way.

This CL changes them to return bool instead.

Test: `mmma -j bootable/recovery`
Test: TreeHugger
Test: Sideload on taimen.
Change-Id: Ic1b5dbf79aaca68b53ab8ea2c8ba3d19f988c571
This commit is contained in:
Tao Bao
2019-04-30 00:25:41 -07:00
parent 865d1df0c9
commit 36c7276cb2
5 changed files with 67 additions and 69 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ static bool CheckWipePackage(Package* wipe_package, RecoveryUI* ui) {
return false;
}
return CheckPackageMetadata(metadata, OtaType::BRICK) == 0;
return CheckPackageMetadata(metadata, OtaType::BRICK);
}
bool WipeAbDevice(Device* device, size_t wipe_package_size) {