diff options
author | Tianjie Xu <xunchang@google.com> | 2018-03-26 23:32:11 +0200 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2018-04-02 22:32:02 +0200 |
commit | a6f49bd9520e02d84026e31a53a6c98db59d91a3 (patch) | |
tree | edae1ad7d4d8c6997c238b789492174cf3f2c9f8 /recovery.cpp | |
parent | Merge "Create the SystemUpdate activity class." (diff) | |
download | android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.tar android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.tar.gz android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.tar.bz2 android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.tar.lz android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.tar.xz android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.tar.zst android_bootable_recovery-a6f49bd9520e02d84026e31a53a6c98db59d91a3.zip |
Diffstat (limited to 'recovery.cpp')
-rw-r--r-- | recovery.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recovery.cpp b/recovery.cpp index 6bd291463..910cd8296 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1537,14 +1537,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); |