aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-08-26 10:32:29 -0500
committerTao Bao2017-08-26 10:47:43 -0500
commit1e27d14eea7c11eb099e0e05dd0e26a49f21a13b (patch)
tree08866ff78ed21579dd47b6150409b90f31d854be /wear_ui.cpp
parent571855b0e6e8046f19f4c623df22db1b6a6cdaee (diff)
downloadplatform-bootable-recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.gz
platform-bootable-recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.xz
platform-bootable-recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.zip
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
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index 169ef20e..71a53519 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -191,20 +191,6 @@ void WearRecoveryUI::update_progress_locked() {
191 gr_flip(); 191 gr_flip();
192} 192}
193 193
194bool WearRecoveryUI::InitTextParams() {
195 if (!ScreenRecoveryUI::InitTextParams()) {
196 return false;
197 }
198
199 text_cols_ = (gr_fb_width() - (kMarginWidth * 2)) / char_width_;
200
201 if (text_rows_ > kMaxRows) text_rows_ = kMaxRows;
202 if (text_cols_ > kMaxCols) text_cols_ = kMaxCols;
203
204 visible_text_rows = (gr_fb_height() - (kMarginHeight * 2)) / char_height_;
205 return true;
206}
207
208bool WearRecoveryUI::Init(const std::string& locale) { 194bool WearRecoveryUI::Init(const std::string& locale) {
209 if (!ScreenRecoveryUI::Init(locale)) { 195 if (!ScreenRecoveryUI::Init(locale)) {
210 return false; 196 return false;
@@ -269,7 +255,7 @@ void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* it
269 show_menu = true; 255 show_menu = true;
270 menu_sel = initial_selection; 256 menu_sel = initial_selection;
271 menu_start = 0; 257 menu_start = 0;
272 menu_end = visible_text_rows - 1 - kMenuUnusableRows; 258 menu_end = text_rows_ - 1 - kMenuUnusableRows;
273 if (menu_items <= menu_end) menu_end = menu_items; 259 if (menu_items <= menu_end) menu_end = menu_items;
274 update_screen_locked(); 260 update_screen_locked();
275 } 261 }