From 568700189528c69a6cdd7a246127ce01463e033d Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 29 Apr 2016 15:37:05 -0700 Subject: [PATCH] recovery: Always log the update attempt. An OTA may be skipped due to low battery. But we should always log it to understand why an update _fails_ to apply. Bug: 27893175 Change-Id: I50a3fbbb3e51035e0ac5f1cca150e283852825c3 --- recovery.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recovery.cpp b/recovery.cpp index dbdc1fbd..70986e73 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1442,6 +1442,10 @@ int main(int argc, char **argv) { int status = INSTALL_SUCCESS; if (update_package != NULL) { + // It's not entirely true that we will modify the flash. But we want + // to log the update attempt since update_package is non-NULL. + modified_flash = true; + if (!is_battery_ok()) { ui->Print("battery capacity is not enough for installing package, needed is %d%%\n", BATTERY_OK_PERCENTAGE);