From 1e27d14eea7c11eb099e0e05dd0e26a49f21a13b Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Sat, 26 Aug 2017 08:32:29 -0700 Subject: wear_ui: Remove kMaxCols/kMaxRows/visible_text_rows/menu_headers_. We've deprecated kMaxCols/kMaxRows in ScreenRecoveryUI since commit aa0d6afb61f4cf928e87c7a21bcb59fc973f15a0. They unnecessarily limit the screen size to 96x96 characters. Also remove the recomputations of text_cols, visible_text_rows (which is the same as text_rows_). Remove the unintentional hiding of menu_headers_. Test: mmma bootable/recovery Change-Id: I7d1526b651943312d62d52cd200414b42bf9b12a --- wear_ui.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'wear_ui.cpp') diff --git a/wear_ui.cpp b/wear_ui.cpp index 169ef20e1..71a535199 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -191,20 +191,6 @@ void WearRecoveryUI::update_progress_locked() { gr_flip(); } -bool WearRecoveryUI::InitTextParams() { - if (!ScreenRecoveryUI::InitTextParams()) { - return false; - } - - text_cols_ = (gr_fb_width() - (kMarginWidth * 2)) / char_width_; - - if (text_rows_ > kMaxRows) text_rows_ = kMaxRows; - if (text_cols_ > kMaxCols) text_cols_ = kMaxCols; - - visible_text_rows = (gr_fb_height() - (kMarginHeight * 2)) / char_height_; - return true; -} - bool WearRecoveryUI::Init(const std::string& locale) { if (!ScreenRecoveryUI::Init(locale)) { return false; @@ -269,7 +255,7 @@ void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* it show_menu = true; menu_sel = initial_selection; menu_start = 0; - menu_end = visible_text_rows - 1 - kMenuUnusableRows; + menu_end = text_rows_ - 1 - kMenuUnusableRows; if (menu_items <= menu_end) menu_end = menu_items; update_screen_locked(); } -- cgit v1.2.3