Add a header value for configure max downlaod retry count am: 3cc4fa3842
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/2235364
Change-Id: I8d27ae39e6fa6f8b72fa66c7e6caede28b433e12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/aosp/update_attempter_android.cc b/aosp/update_attempter_android.cc
index aab6d2d..9b90030 100644
--- a/aosp/update_attempter_android.cc
+++ b/aosp/update_attempter_android.cc
@@ -331,6 +331,10 @@
LOG(FATAL) << "Unsupported sideload URI: " << payload_url;
#else
LibcurlHttpFetcher* libcurl_fetcher = new LibcurlHttpFetcher(hardware_);
+ if (!headers[kPayloadDownloadRetry].empty()) {
+ libcurl_fetcher->set_max_retry_count(
+ atoi(headers[kPayloadDownloadRetry].c_str()));
+ }
libcurl_fetcher->set_server_to_check(ServerToCheck::kDownload);
fetcher = libcurl_fetcher;
#endif // _UE_SIDELOAD
diff --git a/common/constants.h b/common/constants.h
index f27d2db..11be740 100644
--- a/common/constants.h
+++ b/common/constants.h
@@ -176,8 +176,13 @@
// Proxy URL to use for downloading OTA. This will be forwarded to libcurl
static constexpr const auto& kPayloadPropertyNetworkProxy = "NETWORK_PROXY";
+// Set Virtual AB Compression's compression algorithm to "none", but still use
+// userspace snapshots and snapuserd for update installation.
static constexpr const auto& kPayloadDisableVABC = "DISABLE_VABC";
+// Max retry count for download
+static constexpr const auto& kPayloadDownloadRetry = "DOWNLOAD_RETRY";
+
// Set "SWITCH_SLOT_ON_REBOOT=0" to skip marking the updated partitions active.
// The default is 1 (always switch slot if update succeeded).
static constexpr const auto& kPayloadPropertySwitchSlotOnReboot =