update_engine: Block logging of invalid EOL date
A simple blocakage of warning log, which stops spams that can happen
prior to GE actually sending the optional attribute for EOL date.
Even fetching the value of EOL date my not exists, so will also be
removed for prefs as callers should log based on return value.
BUG=chromium:1014758
TEST=none
Change-Id: Ib2da2e9574c670c99deea6e8c8409f7e83d216e9
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/1863008
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
Auto-Submit: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/omaha_utils.cc b/omaha_utils.cc
index 9fe425b..f9ec85a 100644
--- a/omaha_utils.cc
+++ b/omaha_utils.cc
@@ -63,7 +63,9 @@
EolDate StringToEolDate(const std::string& eol_date) {
EolDate date = kEolDateInvalid;
if (!base::StringToInt64(eol_date, &date)) {
- LOG(WARNING) << "Invalid EOL date attribute: " << eol_date;
+ // TODO(b/142823480): Once Omaha is passing _eol_date attribute, this log
+ // may be turned back on.
+ // LOG(WARNING) << "Invalid EOL date attribute: " << eol_date;
return kEolDateInvalid;
}
return date;