Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1546892 authored by Tianjie Xu's avatar Tianjie Xu Committed by android-build-merger
Browse files

Merge "Fix the input parameter for "set_retry_bootloader_message"" am: 0e60ccdc

am: 1d6f8867

Change-Id: I280282a1b2676e3030a0327239781f50fb7a64d8
parents 9539cdb3 1d6f8867
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -1304,11 +1304,11 @@ static bool is_battery_ok() {
    }
}

static void set_retry_bootloader_message(int retry_count, int argc, char** argv) {
static void set_retry_bootloader_message(int retry_count, const std::vector<std::string>& args) {
  std::vector<std::string> options;
    for (int i = 1; i < argc; ++i) {
        if (strstr(argv[i], "retry_count") == nullptr) {
            options.push_back(argv[i]);
  for (const auto& arg : args) {
    if (!android::base::StartsWith(arg, "--retry_count")) {
      options.push_back(arg);
    }
  }

@@ -1534,7 +1534,7 @@ int main(int argc, char **argv) {
                // times before we abandon this OTA update.
                if (status == INSTALL_RETRY && retry_count < EIO_RETRY_COUNT) {
                    copy_logs();
                    set_retry_bootloader_message(retry_count, argc, argv);
                    set_retry_bootloader_message(retry_count, args);
                    // Print retry count on screen.
                    ui->Print("Retry attempt %d\n", retry_count);