summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-08-28 22:38:54 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-08-28 22:38:54 +0200
commitc664a9a4232307f0260dac2839bb01e75b43c021 (patch)
treea05de9928a273182169c66d4883eeea786d5b854 /wear_ui.cpp
parentMerge "wear_ui: Remove dead 'self' and 'progress_t'." am: 2e125bec2f am: f351a576ce am: 813120749d (diff)
parentMerge "wear_ui: Remove kMaxCols/kMaxRows/visible_text_rows/menu_headers_." am: e9605b8ca0 am: d92baf5988 (diff)
downloadandroid_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.tar
android_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.tar.gz
android_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.tar.bz2
android_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.tar.lz
android_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.tar.xz
android_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.tar.zst
android_bootable_recovery-c664a9a4232307f0260dac2839bb01e75b43c021.zip
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 75d01bdc3..e4806718d 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -185,20 +185,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;
@@ -263,7 +249,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();
}