From 1ac4efa02d0023b219e54af34d154122be3dbead Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Fri, 21 Nov 2014 16:13:22 -0800 Subject: recovery: New icon type VIEWING_LOG * Fixes "View recovery logs" This is probably not the best solution, perhaps find a different way? Change-Id: Ibd901ce7f69ec05c4d26cdb027e51b7e5b826034 --- screen_ui.cpp | 4 +++- ui.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/screen_ui.cpp b/screen_ui.cpp index f5c4916..5ed74a6 100644 --- a/screen_ui.cpp +++ b/screen_ui.cpp @@ -350,7 +350,7 @@ void ScreenRecoveryUI::draw_screen_locked() { gr_color(0, 0, 0, 255); gr_clear(); - if (currentIcon == INSTALLING_UPDATE) { + if (currentIcon == INSTALLING_UPDATE || currentIcon == VIEWING_LOG) { size_t y = header_height_ + 4; draw_background_locked(currentIcon); @@ -688,6 +688,8 @@ void ScreenRecoveryUI::ShowFile(FILE* fp) { offsets.push_back(ftell(fp)); ClearText(); + SetBackground(RecoveryUI::VIEWING_LOG); + struct stat sb; fstat(fileno(fp), &sb); diff --git a/ui.h b/ui.h index acf3645..df7fbde 100644 --- a/ui.h +++ b/ui.h @@ -106,7 +106,7 @@ class RecoveryUI { virtual void SetLocale(const char* locale) = 0; // Set the overall recovery state ("background image"). - enum Icon { NONE, INSTALLING_UPDATE, ERASING, NO_COMMAND, D_INFO, D_ERROR, NR_ICONS }; + enum Icon { NONE, INSTALLING_UPDATE, VIEWING_LOG, ERASING, NO_COMMAND, D_INFO, D_ERROR, NR_ICONS }; virtual void SetBackground(Icon icon) = 0; // --- progress indicator --- -- cgit v1.1