aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Hansen <rhansen@rhansen.org>2020-05-04 15:56:36 -0400
committerAlessandro Astone <ales.astone@gmail.com>2020-06-08 17:14:21 +0200
commitd1412e39edead25cc5616db626893142b478f480 (patch)
tree0e58c8ccc66613f2dba37d84ab50591e911a610c
parent33aec6c3978d28c5affc45ee27714820aab083f9 (diff)
downloadandroid_bootable_recovery-lineage-17.1.tar.gz
android_bootable_recovery-lineage-17.1.tar.bz2
android_bootable_recovery-lineage-17.1.zip
recovery: Print the active slotHEADlineage-17.1
Addresses https://gitlab.com/LineageOS/issues/android/-/issues/1893 Change-Id: I9fd731c3427c3a52641aa2e9c89eb9a20bafdd57
-rw-r--r--recovery.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 72f000b8..aeb7bdef 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -950,6 +950,11 @@ Device::BuiltinAction start_recovery(Device* device, const std::vector<std::stri
"Version " + android::base::GetProperty("ro.lineage.build.version", "(unknown)") +
" (" + ver_date + ")",
};
+ 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();