aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorAlessandro Astone <ales.astone@gmail.com>2020-10-04 21:59:52 +0200
committerMichael Bestas <mkbestas@lineageos.org>2022-08-21 19:38:14 +0300
commit11b1acf2aa9d2915b63fabd59c479a8137a403b7 (patch)
tree6726c58b703508bfa0d4098c83f46e687271558b /install
parent8f4e0108d45838fac4708422d3fdbed171873637 (diff)
recovery: Don't consider manual install aborts as errors
* From android-11, recovery warns the user about the danger of rebooting after a failed update, but if we didn't even start the install procedure it doesn't really make much sense. Change-Id: Ifaf5eae9fe6e1d915a035e2570c22260de59f99b
Diffstat (limited to 'install')
-rw-r--r--install/adb_install.cpp2
-rw-r--r--install/fuse_install.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/install/adb_install.cpp b/install/adb_install.cpp
index cf2fe60a..9101e40c 100644
--- a/install/adb_install.cpp
+++ b/install/adb_install.cpp
@@ -363,7 +363,7 @@ InstallResult ApplyFromAdb(Device* device, bool rescue_mode, Device::BuiltinActi
RecoveryUI* ui = device->GetUI();
- InstallResult install_result = INSTALL_ERROR;
+ InstallResult install_result = INSTALL_NONE;
std::map<MinadbdCommand, CommandFunction> command_map{
{ MinadbdCommand::kInstall, std::bind(&AdbInstallPackageHandler, device, &install_result) },
{ MinadbdCommand::kRebootAndroid, std::bind(&AdbRebootHandler, MinadbdCommand::kRebootAndroid,
diff --git a/install/fuse_install.cpp b/install/fuse_install.cpp
index 09d04a8e..a7c58246 100644
--- a/install/fuse_install.cpp
+++ b/install/fuse_install.cpp
@@ -212,14 +212,14 @@ InstallResult ApplyFromSdcard(Device* device) {
auto ui = device->GetUI();
if (ensure_path_mounted(SDCARD_ROOT) != 0) {
LOG(ERROR) << "\n-- Couldn't mount " << SDCARD_ROOT << ".\n";
- return INSTALL_ERROR;
+ return INSTALL_NONE;
}
std::string path = BrowseDirectory(SDCARD_ROOT, device, ui);
if (path.empty()) {
LOG(ERROR) << "\n-- No package file selected.\n";
ensure_path_unmounted(SDCARD_ROOT);
- return INSTALL_ERROR;
+ return INSTALL_NONE;
}
// Hint the install function to read from a block map file.