InstallPackage now takes a package as parameter
Therefore InstallPackage() doesn't need to worry about the details of a given Package. Bug: 127071893 Test: run update from /bin/recovery --update_package=@path, sideload a package Change-Id: I0caa36785b43924f884ee398e7ea640d7472a92e
This commit is contained in:
+9
-1
@@ -732,7 +732,15 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
|
||||
set_retry_bootloader_message(retry_count + 1, args);
|
||||
}
|
||||
|
||||
status = InstallPackage(update_package, should_wipe_cache, true, retry_count, ui);
|
||||
if (update_package[0] == '@') {
|
||||
ensure_path_mounted(update_package + 1);
|
||||
} else {
|
||||
ensure_path_mounted(update_package);
|
||||
}
|
||||
// TODO(xunchang) install package from fuse for large packages on ILP32 builds.
|
||||
auto package = Package::CreateMemoryPackage(
|
||||
update_package, std::bind(&RecoveryUI::SetProgress, ui, std::placeholders::_1));
|
||||
status = InstallPackage(package.get(), update_package, should_wipe_cache, retry_count, ui);
|
||||
if (status != INSTALL_SUCCESS) {
|
||||
ui->Print("Installation aborted.\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user