summaryrefslogtreecommitdiffstats
path: root/wear_ui.cpp
diff options
context:
space:
mode:
authorSen Jiang <senj@google.com>2016-12-10 01:20:49 +0100
committerSen Jiang <senj@google.com>2016-12-13 22:29:33 +0100
commitd530449e54bd327e9c26209ffa0490c6508afe6c (patch)
tree0b1d25af5cad4e0e4b1035b5dad3a86c06835e0a /wear_ui.cpp
parentMerge "clang-format: Adjust short functions / if settings." (diff)
downloadandroid_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.tar
android_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.tar.gz
android_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.tar.bz2
android_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.tar.lz
android_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.tar.xz
android_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.tar.zst
android_bootable_recovery-d530449e54bd327e9c26209ffa0490c6508afe6c.zip
Diffstat (limited to '')
-rw-r--r--wear_ui.cpp14
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)