diff options
author | Sen Jiang <senj@google.com> | 2016-12-14 23:21:48 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-12-14 23:21:48 +0100 |
commit | b29f25888a9033a0cc3b151a929b1b29fa727f75 (patch) | |
tree | 6066d58e37b89d85081c1f32ca5b406437b159fa /wear_ui.cpp | |
parent | Merge "updater: Fix the operator order." am: 2bb3a2270e am: f7f3f821a8 (diff) | |
parent | Merge "Add a stub recovery UI." am: 8c1584feaf (diff) | |
download | android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.tar android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.tar.gz android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.tar.bz2 android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.tar.lz android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.tar.xz android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.tar.zst android_bootable_recovery-b29f25888a9033a0cc3b151a929b1b29fa727f75.zip |
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r-- | wear_ui.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp index 0918ac457..11e5a7168 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -190,8 +190,10 @@ void WearRecoveryUI::update_progress_locked() { gr_flip(); } -void WearRecoveryUI::InitTextParams() { - ScreenRecoveryUI::InitTextParams(); +bool WearRecoveryUI::InitTextParams() { + if (!ScreenRecoveryUI::InitTextParams()) { + return false; + } text_cols_ = (gr_fb_width() - (outer_width * 2)) / char_width_; @@ -199,15 +201,19 @@ void WearRecoveryUI::InitTextParams() { if (text_cols_ > kMaxCols) text_cols_ = kMaxCols; visible_text_rows = (gr_fb_height() - (outer_height * 2)) / char_height_; + return true; } -void WearRecoveryUI::Init() { - ScreenRecoveryUI::Init(); +bool WearRecoveryUI::Init() { + if (!ScreenRecoveryUI::Init()) { + return false; + } LoadBitmap("icon_installing", &backgroundIcon[INSTALLING_UPDATE]); backgroundIcon[ERASING] = backgroundIcon[INSTALLING_UPDATE]; LoadBitmap("icon_error", &backgroundIcon[ERROR]); backgroundIcon[NO_COMMAND] = backgroundIcon[ERROR]; + return true; } void WearRecoveryUI::SetStage(int current, int max) |