summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2018-04-03 02:52:44 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-04-03 02:52:44 +0200
commit770ab63945b5191bdd757fbad9c9676ea4c53392 (patch)
tree9cb83ded2e34cd0edfb1482ca4df3cb5ae57faf9
parentMerge "Create the SystemUpdate activity class." am: c506482abc am: c974a1f404 (diff)
parentMerge "Do not skip the update installation if it's a retry" am: e566168c94 (diff)
downloadandroid_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.tar
android_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.tar.gz
android_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.tar.bz2
android_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.tar.lz
android_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.tar.xz
android_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.tar.zst
android_bootable_recovery-770ab63945b5191bdd757fbad9c9676ea4c53392.zip
-rw-r--r--recovery.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp
index d887d07fb..e266d9312 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -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);