Loading install/install.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ 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); bool ask_to_continue_spl_downgrade(Device* device); Loading Loading @@ -407,6 +408,13 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache, bool has_metadata = ReadMetadataFromPackage(zip, &metadata); const bool package_is_ab = has_metadata && get_value(metadata, "ota-type") == OtaTypeToString(OtaType::AB); if (package_is_ab && !IsCancelUpdateSafe(device)) { if (!IsCancelUpdateSafe(device)) { if (!ask_to_cancel_ota(device)) { return INSTALL_ERROR; } } } const bool package_is_brick = get_value(metadata, "ota-type") == OtaTypeToString(OtaType::BRICK); if (package_is_brick) { LOG(INFO) << "Installing a brick package"; Loading recovery.cpp +1 −8 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ static bool ask_to_wipe_data(Device* device) { return (chosen_item == 1); } static bool ask_to_cancel_ota(Device* device) { bool ask_to_cancel_ota(Device* device) { // clang-format off std::vector<std::string> headers{ "Overwrite in-progress update?", Loading Loading @@ -604,13 +604,6 @@ change_menu: case Device::APPLY_UPDATE: case Device::ENTER_RESCUE: { save_current_log = true; if (!IsCancelUpdateSafe(device)) { if (!ask_to_cancel_ota(device)) { break; } } update_in_progress = true; WriteUpdateInProgress(); Loading Loading
install/install.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ 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); bool ask_to_continue_spl_downgrade(Device* device); Loading Loading @@ -407,6 +408,13 @@ static InstallResult TryUpdateBinary(Package* package, bool* wipe_cache, bool has_metadata = ReadMetadataFromPackage(zip, &metadata); const bool package_is_ab = has_metadata && get_value(metadata, "ota-type") == OtaTypeToString(OtaType::AB); if (package_is_ab && !IsCancelUpdateSafe(device)) { if (!IsCancelUpdateSafe(device)) { if (!ask_to_cancel_ota(device)) { return INSTALL_ERROR; } } } const bool package_is_brick = get_value(metadata, "ota-type") == OtaTypeToString(OtaType::BRICK); if (package_is_brick) { LOG(INFO) << "Installing a brick package"; Loading
recovery.cpp +1 −8 Original line number Diff line number Diff line Loading @@ -220,7 +220,7 @@ static bool ask_to_wipe_data(Device* device) { return (chosen_item == 1); } static bool ask_to_cancel_ota(Device* device) { bool ask_to_cancel_ota(Device* device) { // clang-format off std::vector<std::string> headers{ "Overwrite in-progress update?", Loading Loading @@ -604,13 +604,6 @@ change_menu: case Device::APPLY_UPDATE: case Device::ENTER_RESCUE: { save_current_log = true; if (!IsCancelUpdateSafe(device)) { if (!ask_to_cancel_ota(device)) { break; } } update_in_progress = true; WriteUpdateInProgress(); Loading