summaryrefslogtreecommitdiffstats
path: root/screen_ui.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-01-02 20:35:38 +0100
committerDavid Anderson <dvander@google.com>2019-02-12 04:22:03 +0100
commit983e2d571814ffaf9a88bc6cbc976ff3445d4aae (patch)
treee4b27f45eb173760b939c9261176047da8b0b40a /screen_ui.cpp
parentMerge "Defer marking boot successful when checkpointing" (diff)
downloadandroid_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.tar
android_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.tar.gz
android_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.tar.bz2
android_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.tar.lz
android_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.tar.xz
android_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.tar.zst
android_bootable_recovery-983e2d571814ffaf9a88bc6cbc976ff3445d4aae.zip
Diffstat (limited to '')
-rw-r--r--screen_ui.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 6c00a2235..6f2b68b41 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -701,6 +701,16 @@ void ScreenRecoveryUI::draw_screen_locked() {
void ScreenRecoveryUI::draw_menu_and_text_buffer_locked(
const std::vector<std::string>& help_message) {
int y = margin_height_;
+
+ if (fastbootd_logo_ && fastbootd_logo_enabled_) {
+ // Try to get this centered on screen.
+ auto width = gr_get_width(fastbootd_logo_.get());
+ auto height = gr_get_height(fastbootd_logo_.get());
+ auto centered_x = ScreenWidth() / 2 - width / 2;
+ DrawSurface(fastbootd_logo_.get(), 0, 0, width, height, centered_x, y);
+ y += height;
+ }
+
if (menu_) {
int x = margin_width_ + kMenuIndent;
@@ -890,6 +900,10 @@ bool ScreenRecoveryUI::Init(const std::string& locale) {
no_command_text_ = LoadLocalizedBitmap("no_command_text");
error_text_ = LoadLocalizedBitmap("error_text");
+ if (android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) {
+ fastbootd_logo_ = LoadBitmap("fastbootd");
+ }
+
// Background text for "installing_update" could be "installing update" or
// "installing security update". It will be set after Init() according to the commands in BCB.
installing_text_.reset();