Loading install/install.cpp +0 −21 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ #include <android-base/strings.h> #include <android-base/unique_fd.h> #include "bootloader_message/bootloader_message.h" #include "install/snapshot_utils.h" #include "install/spl_check.h" #include "install/wipe_data.h" Loading @@ -64,7 +63,6 @@ using namespace std::chrono_literals; bool ask_to_ab_reboot(Device* device); bool ask_to_cancel_ota(Device* device); bool ask_to_continue_unverified(Device* device); bool ask_to_continue_downgrade(Device* device); Loading Loading @@ -449,21 +447,6 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache, spl_downgrade_approved = true; } const auto reboot_to_recovery = [] { if (std::string err; !clear_bootloader_message(&err)) { LOG(ERROR) << "Failed to clear BCB message: " << err; } Reboot("recovery"); }; static bool ab_package_installed = false; if (ab_package_installed) { if (ask_to_ab_reboot(device)) { reboot_to_recovery(); } return INSTALL_ERROR; } if (package_is_ab) { CHECK(package->GetType() == PackageType::kFile); } Loading Loading @@ -649,11 +632,7 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache, LOG(FATAL) << "Invalid status code " << status; } if (package_is_ab) { ab_package_installed = true; PerformPowerwashIfRequired(zip, device); if (!ui->IsSideloadAutoReboot() && ask_to_ab_reboot(device)) { reboot_to_recovery(); } } return INSTALL_SUCCESS; Loading recovery.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -172,12 +172,6 @@ static bool yes_no(Device* device, const char* question1, const char* question2) return (chosen_item == 1); } bool ask_to_ab_reboot(Device* device) { device->GetUI()->SetProgressType(RecoveryUI::EMPTY); return yes_no(device, "To install additional packages, you need to reboot recovery first", "Do you want to reboot to recovery now?"); } bool ask_to_continue_unverified(Device* device) { if (get_build_type() == "user") { return false; Loading Loading @@ -1015,7 +1009,6 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri if (!sideload_auto_reboot) { ui->ShowText(true); } ui->SetSideloadAutoReboot(sideload_auto_reboot); status = ApplyFromAdb(device, false /* rescue_mode */, &next_action); ui->Print("\nInstall from ADB complete (status: %d).\n", status); if (sideload_auto_reboot) { Loading recovery_ui/include/recovery_ui/ui.h +0 −10 Original line number Diff line number Diff line Loading @@ -301,14 +301,6 @@ class RecoveryUI { EnqueueKey(KEY_REFRESH); } bool IsSideloadAutoReboot() const { return sideload_auto_reboot_; } void SetSideloadAutoReboot(bool sar) { sideload_auto_reboot_ = sar; } protected: void EnqueueKey(int key_code); void EnqueueTouch(const Point& pos); Loading @@ -326,8 +318,6 @@ class RecoveryUI { bool fastbootd_logo_enabled_; bool sideload_auto_reboot_; private: enum class ScreensaverState { DISABLED, Loading recovery_ui/ui.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ RecoveryUI::RecoveryUI() DEFAULT_MAX_BRIGHTNESS_FILE)), touch_screen_allowed_(true), fastbootd_logo_enabled_(false), sideload_auto_reboot_(false), touch_low_threshold_(android::base::GetIntProperty("ro.recovery.ui.touch_low_threshold", kDefaultTouchLowThreshold)), touch_high_threshold_(android::base::GetIntProperty("ro.recovery.ui.touch_high_threshold", Loading Loading
install/install.cpp +0 −21 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ #include <android-base/strings.h> #include <android-base/unique_fd.h> #include "bootloader_message/bootloader_message.h" #include "install/snapshot_utils.h" #include "install/spl_check.h" #include "install/wipe_data.h" Loading @@ -64,7 +63,6 @@ using namespace std::chrono_literals; bool ask_to_ab_reboot(Device* device); bool ask_to_cancel_ota(Device* device); bool ask_to_continue_unverified(Device* device); bool ask_to_continue_downgrade(Device* device); Loading Loading @@ -449,21 +447,6 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache, spl_downgrade_approved = true; } const auto reboot_to_recovery = [] { if (std::string err; !clear_bootloader_message(&err)) { LOG(ERROR) << "Failed to clear BCB message: " << err; } Reboot("recovery"); }; static bool ab_package_installed = false; if (ab_package_installed) { if (ask_to_ab_reboot(device)) { reboot_to_recovery(); } return INSTALL_ERROR; } if (package_is_ab) { CHECK(package->GetType() == PackageType::kFile); } Loading Loading @@ -649,11 +632,7 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache, LOG(FATAL) << "Invalid status code " << status; } if (package_is_ab) { ab_package_installed = true; PerformPowerwashIfRequired(zip, device); if (!ui->IsSideloadAutoReboot() && ask_to_ab_reboot(device)) { reboot_to_recovery(); } } return INSTALL_SUCCESS; Loading
recovery.cpp +0 −7 Original line number Diff line number Diff line Loading @@ -172,12 +172,6 @@ static bool yes_no(Device* device, const char* question1, const char* question2) return (chosen_item == 1); } bool ask_to_ab_reboot(Device* device) { device->GetUI()->SetProgressType(RecoveryUI::EMPTY); return yes_no(device, "To install additional packages, you need to reboot recovery first", "Do you want to reboot to recovery now?"); } bool ask_to_continue_unverified(Device* device) { if (get_build_type() == "user") { return false; Loading Loading @@ -1015,7 +1009,6 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri if (!sideload_auto_reboot) { ui->ShowText(true); } ui->SetSideloadAutoReboot(sideload_auto_reboot); status = ApplyFromAdb(device, false /* rescue_mode */, &next_action); ui->Print("\nInstall from ADB complete (status: %d).\n", status); if (sideload_auto_reboot) { Loading
recovery_ui/include/recovery_ui/ui.h +0 −10 Original line number Diff line number Diff line Loading @@ -301,14 +301,6 @@ class RecoveryUI { EnqueueKey(KEY_REFRESH); } bool IsSideloadAutoReboot() const { return sideload_auto_reboot_; } void SetSideloadAutoReboot(bool sar) { sideload_auto_reboot_ = sar; } protected: void EnqueueKey(int key_code); void EnqueueTouch(const Point& pos); Loading @@ -326,8 +318,6 @@ class RecoveryUI { bool fastbootd_logo_enabled_; bool sideload_auto_reboot_; private: enum class ScreensaverState { DISABLED, Loading
recovery_ui/ui.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,6 @@ RecoveryUI::RecoveryUI() DEFAULT_MAX_BRIGHTNESS_FILE)), touch_screen_allowed_(true), fastbootd_logo_enabled_(false), sideload_auto_reboot_(false), touch_low_threshold_(android::base::GetIntProperty("ro.recovery.ui.touch_low_threshold", kDefaultTouchLowThreshold)), touch_high_threshold_(android::base::GetIntProperty("ro.recovery.ui.touch_high_threshold", Loading