summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-08-26 17:32:29 +0200
committerTao Bao <tbao@google.com>2017-08-26 17:47:43 +0200
commit1e27d14eea7c11eb099e0e05dd0e26a49f21a13b (patch)
tree08866ff78ed21579dd47b6150409b90f31d854be
parentMerge "Add missing report of error code under recovery" (diff)
downloadandroid_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar
android_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.gz
android_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.bz2
android_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.lz
android_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.xz
android_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.tar.zst
android_bootable_recovery-1e27d14eea7c11eb099e0e05dd0e26a49f21a13b.zip
Diffstat (limited to '')
-rw-r--r--wear_ui.cpp16
-rw-r--r--wear_ui.h9
2 files changed, 1 insertions, 24 deletions
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();
}
diff --git a/wear_ui.h b/wear_ui.h
index 3bd90b699..2c5b7e481 100644
--- a/wear_ui.h
+++ b/wear_ui.h
@@ -50,8 +50,6 @@ class WearRecoveryUI : public ScreenRecoveryUI {
int GetProgressBaseline() const override;
- bool InitTextParams() override;
-
void update_progress_locked() override;
void PrintV(const char*, bool, va_list) override;
@@ -59,13 +57,6 @@ class WearRecoveryUI : public ScreenRecoveryUI {
private:
GRSurface* backgroundIcon[5];
- static const int kMaxCols = 96;
- static const int kMaxRows = 96;
-
- // Number of text rows seen on screen
- int visible_text_rows;
-
- const char* const* menu_headers_;
int menu_start, menu_end;
pthread_t progress_t;