diff options
author | Tao Bao <tbao@google.com> | 2019-05-01 00:36:27 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-05-01 00:36:27 +0200 |
commit | 2ea4768d6e504f4e190e4f045cfae5dddcfe7f52 (patch) | |
tree | 8809b8d3b1557bffd6cf6bb14254109b03573797 /install/adb_install.cpp | |
parent | Merge "tests: Merge recovery_component_test into recovery_unit_test." (diff) | |
parent | Merge changes I2d42f55a,Ic1b5dbf7 (diff) | |
download | android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.tar android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.tar.gz android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.tar.bz2 android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.tar.lz android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.tar.xz android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.tar.zst android_bootable_recovery-2ea4768d6e504f4e190e4f045cfae5dddcfe7f52.zip |
Diffstat (limited to 'install/adb_install.cpp')
-rw-r--r-- | install/adb_install.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/install/adb_install.cpp b/install/adb_install.cpp index 4dd1f1b09..2de1075d2 100644 --- a/install/adb_install.cpp +++ b/install/adb_install.cpp @@ -90,7 +90,7 @@ static bool WriteStatusToFd(MinadbdCommandStatus status, int fd) { // Installs the package from FUSE. Returns the installation result and whether it should continue // waiting for new commands. -static auto AdbInstallPackageHandler(RecoveryUI* ui, int* result) { +static auto AdbInstallPackageHandler(RecoveryUI* ui, InstallResult* result) { // How long (in seconds) we wait for the package path to be ready. It doesn't need to be too long // because the minadbd service has already issued an install command. FUSE_SIDELOAD_HOST_PATHNAME // will start to exist once the host connects and starts serving a package. Poll for its @@ -110,7 +110,7 @@ static auto AdbInstallPackageHandler(RecoveryUI* ui, int* result) { break; } } - *result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, false, false, 0, ui); + *result = InstallPackage(FUSE_SIDELOAD_HOST_PATHNAME, false, false, 0, ui); break; } @@ -120,7 +120,7 @@ static auto AdbInstallPackageHandler(RecoveryUI* ui, int* result) { return std::make_pair(*result == INSTALL_SUCCESS, should_continue); } -static auto AdbRebootHandler(MinadbdCommand command, int* result, +static auto AdbRebootHandler(MinadbdCommand command, InstallResult* result, Device::BuiltinAction* reboot_action) { // Use Device::REBOOT_{FASTBOOT,RECOVERY,RESCUE}, instead of the ones with ENTER_. This allows // rebooting back into fastboot/recovery/rescue mode through bootloader, which may use a newly @@ -331,7 +331,7 @@ static void CreateMinadbdServiceAndExecuteCommands( signal(SIGPIPE, SIG_DFL); } -int ApplyFromAdb(Device* device, bool rescue_mode, Device::BuiltinAction* reboot_action) { +InstallResult ApplyFromAdb(Device* device, bool rescue_mode, Device::BuiltinAction* reboot_action) { // Save the usb state to restore after the sideload operation. std::string usb_state = android::base::GetProperty("sys.usb.state", "none"); // Clean up state and stop adbd. @@ -342,7 +342,7 @@ int ApplyFromAdb(Device* device, bool rescue_mode, Device::BuiltinAction* reboot RecoveryUI* ui = device->GetUI(); - int install_result = INSTALL_ERROR; + InstallResult install_result = INSTALL_ERROR; std::map<MinadbdCommand, CommandFunction> command_map{ { MinadbdCommand::kInstall, std::bind(&AdbInstallPackageHandler, ui, &install_result) }, { MinadbdCommand::kRebootAndroid, std::bind(&AdbRebootHandler, MinadbdCommand::kRebootAndroid, |