Merge "Do not skip the update installation if it's a retry" am: e566168c94 am: 2e0ac38d40

am: f533e4adfd

Change-Id: I04c2444eab73519440245e7e22ce7494d0d9085c
This commit is contained in:
Tianjie Xu
2018-04-02 17:52:44 -07:00
committed by android-build-merger
+2 -2
View File
@@ -1557,14 +1557,14 @@ int main(int argc, char **argv) {
// to log the update attempt since update_package is non-NULL.
modified_flash = true;
if (!is_battery_ok()) {
if (retry_count == 0 && !is_battery_ok()) {
ui->Print("battery capacity is not enough for installing package, needed is %d%%\n",
BATTERY_OK_PERCENTAGE);
// Log the error code to last_install when installation skips due to
// low battery.
log_failure_code(kLowBattery, update_package);
status = INSTALL_SKIPPED;
} else if (bootreason_in_blacklist()) {
} else if (retry_count == 0 && bootreason_in_blacklist()) {
// Skip update-on-reboot when bootreason is kernel_panic or similar
ui->Print("bootreason is in the blacklist; skip OTA installation\n");
log_failure_code(kBootreasonInBlacklist, update_package);