recovery: Print the active slot

Change-Id: I9fd731c3427c3a52641aa2e9c89eb9a20bafdd57
This commit is contained in:
Richard Hansen 2020-05-04 15:56:36 -04:00 committed by zlewchan
parent 1601bcd61b
commit dfdf5ad555

View file

@ -725,6 +725,12 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
std::vector<std::string> title_lines =
android::base::Split(android::base::GetProperty("ro.build.fingerprint", ""), ":");
title_lines.insert(std::begin(title_lines), "tequilaOS Recovery");
if (android::base::GetBoolProperty("ro.build.ab_update", false)) {
std::string slot = android::base::GetProperty("ro.boot.slot_suffix", "");
if (android::base::StartsWith(slot, "_")) slot.erase(0, 1);
title_lines.push_back("Active slot: " + slot);
}
ui->SetTitle(title_lines);
ui->ResetKeyInterruptStatus();