summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2018-05-22 02:00:23 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-05-22 02:00:23 +0200
commit6283f64568fff87f80c0a948644d3c8377cf7ace (patch)
tree1a64c95a7b5d536a2116c3336853b10403bbe024 /screen_ui.cpp
parentMerge "updater: Clean up the header lines computation." (diff)
parentMerge "recovery: Add ability to set title lines" (diff)
downloadandroid_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.tar
android_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.tar.gz
android_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.tar.bz2
android_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.tar.lz
android_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.tar.xz
android_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.tar.zst
android_bootable_recovery-6283f64568fff87f80c0a948644d3c8377cf7ace.zip
Diffstat (limited to 'screen_ui.cpp')
-rw-r--r--screen_ui.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index fd7a1bea5..f1b38781a 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -496,6 +496,10 @@ int ScreenRecoveryUI::DrawWrappedTextLines(int x, int y,
return offset;
}
+void ScreenRecoveryUI::SetTitle(const std::vector<std::string>& lines) {
+ title_lines_ = lines;
+}
+
// Redraws everything on the screen. Does not flip pages. Should only be called with updateMutex
// locked.
void ScreenRecoveryUI::draw_screen_locked() {
@@ -529,11 +533,9 @@ void ScreenRecoveryUI::draw_menu_and_text_buffer_locked(
int x = kMarginWidth + kMenuIndent;
SetColor(INFO);
- y += DrawTextLine(x, y, "Android Recovery", true);
- std::string recovery_fingerprint =
- android::base::GetProperty("ro.bootimage.build.fingerprint", "");
- for (const auto& chunk : android::base::Split(recovery_fingerprint, ":")) {
- y += DrawTextLine(x, y, chunk, false);
+
+ for (size_t i = 0; i < title_lines_.size(); i++) {
+ y += DrawTextLine(x, y, title_lines_[i], i == 0);
}
y += DrawTextLines(x, y, help_message);