summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2020-07-24 20:57:26 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-07-24 20:57:26 +0200
commit435a5fc0c288c0134edc597c2297a602602be108 (patch)
treec7a4a5e7fb5b66842c745aef778e6d4cfc2b886d /recovery.cpp
parentMerge "Add recovery support of dynamic fingerprints" (diff)
parentUpdate language to comply with Android’s inclusive language guidance (diff)
downloadandroid_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.tar
android_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.tar.gz
android_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.tar.bz2
android_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.tar.lz
android_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.tar.xz
android_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.tar.zst
android_bootable_recovery-435a5fc0c288c0134edc597c2297a602602be108.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/recovery.cpp b/recovery.cpp
index f41ac6acf..d26424ab1 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -559,15 +559,15 @@ static void set_retry_bootloader_message(int retry_count, const std::vector<std:
}
}
-static bool bootreason_in_blacklist() {
+static bool bootreason_in_blocklist() {
std::string bootreason = android::base::GetProperty("ro.boot.bootreason", "");
if (!bootreason.empty()) {
// More bootreasons can be found in "system/core/bootstat/bootstat.cpp".
- static const std::vector<std::string> kBootreasonBlacklist{
+ static const std::vector<std::string> kBootreasonBlocklist{
"kernel_panic",
"Panic",
};
- for (const auto& str : kBootreasonBlacklist) {
+ for (const auto& str : kBootreasonBlocklist) {
if (android::base::EqualsIgnoreCase(str, bootreason)) return true;
}
}
@@ -734,10 +734,10 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
// 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 (retry_count == 0 && bootreason_in_blacklist()) {
+ } else if (retry_count == 0 && bootreason_in_blocklist()) {
// 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);
+ ui->Print("bootreason is in the blocklist; skip OTA installation\n");
+ log_failure_code(kBootreasonInBlocklist, update_package);
status = INSTALL_SKIPPED;
} else {
// It's a fresh update. Initialize the retry_count in the BCB to 1; therefore we can later