aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-06-28 16:52:17 -0500
committerTao Bao2017-07-01 19:41:24 -0500
commitea78d86b44661c69fcb740b9d40b47af821dbd57 (patch)
tree42bc24468b6d9ba025cf10d0ba1d855295cc8e3d /wear_ui.cpp
parent344778c4efddb7701fa8234b51429d27a030356c (diff)
downloadplatform-bootable-recovery-ea78d86b44661c69fcb740b9d40b47af821dbd57.tar.gz
platform-bootable-recovery-ea78d86b44661c69fcb740b9d40b47af821dbd57.tar.xz
platform-bootable-recovery-ea78d86b44661c69fcb740b9d40b47af821dbd57.zip
Update ScreenRecoveryUI::Draw* function signatures.
Move away from taking int* for the Y-offset. Change it to int and return the offset instead. Test: Check the recovery menu and 'Wipe data' menu. Change-Id: Ib15e070a0d576a0f8f66f35605cb8479e7071f26
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r--wear_ui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp
index a29746cd..18c30d34 100644
--- a/wear_ui.cpp
+++ b/wear_ui.cpp
@@ -95,7 +95,7 @@ void WearRecoveryUI::draw_background_locked() {
95 } 95 }
96} 96}
97 97
98static const char* HEADERS[] = { 98static const char* SWIPE_HELP[] = {
99 "Swipe up/down to move.", 99 "Swipe up/down to move.",
100 "Swipe left/right to select.", 100 "Swipe left/right to select.",
101 "", 101 "",
@@ -119,15 +119,15 @@ void WearRecoveryUI::draw_screen_locked() {
119 std::string recovery_fingerprint = 119 std::string recovery_fingerprint =
120 android::base::GetProperty("ro.bootimage.build.fingerprint", ""); 120 android::base::GetProperty("ro.bootimage.build.fingerprint", "");
121 SetColor(HEADER); 121 SetColor(HEADER);
122 DrawTextLine(x + 4, &y, "Android Recovery", true); 122 y += DrawTextLine(x + 4, y, "Android Recovery", true);
123 for (auto& chunk : android::base::Split(recovery_fingerprint, ":")) { 123 for (auto& chunk : android::base::Split(recovery_fingerprint, ":")) {
124 DrawTextLine(x + 4, &y, chunk.c_str(), false); 124 y += DrawTextLine(x + 4, y, chunk.c_str(), false);
125 } 125 }
126 126
127 // This is actually the help strings. 127 // This is actually the help strings.
128 DrawTextLines(x + 4, &y, HEADERS); 128 y += DrawTextLines(x + 4, y, SWIPE_HELP);
129 SetColor(HEADER); 129 SetColor(HEADER);
130 DrawTextLines(x + 4, &y, menu_headers_); 130 y += DrawTextLines(x + 4, y, menu_headers_);
131 131
132 // Show the current menu item number in relation to total number if 132 // Show the current menu item number in relation to total number if
133 // items don't fit on the screen. 133 // items don't fit on the screen.