From ea78d86b44661c69fcb740b9d40b47af821dbd57 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 28 Jun 2017 14:52:17 -0700 Subject: 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 --- wear_ui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wear_ui.cpp') diff --git a/wear_ui.cpp b/wear_ui.cpp index a29746cdc..18c30d34a 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -95,7 +95,7 @@ void WearRecoveryUI::draw_background_locked() { } } -static const char* HEADERS[] = { +static const char* SWIPE_HELP[] = { "Swipe up/down to move.", "Swipe left/right to select.", "", @@ -119,15 +119,15 @@ void WearRecoveryUI::draw_screen_locked() { std::string recovery_fingerprint = android::base::GetProperty("ro.bootimage.build.fingerprint", ""); SetColor(HEADER); - DrawTextLine(x + 4, &y, "Android Recovery", true); + y += DrawTextLine(x + 4, y, "Android Recovery", true); for (auto& chunk : android::base::Split(recovery_fingerprint, ":")) { - DrawTextLine(x + 4, &y, chunk.c_str(), false); + y += DrawTextLine(x + 4, y, chunk.c_str(), false); } // This is actually the help strings. - DrawTextLines(x + 4, &y, HEADERS); + y += DrawTextLines(x + 4, y, SWIPE_HELP); SetColor(HEADER); - DrawTextLines(x + 4, &y, menu_headers_); + y += DrawTextLines(x + 4, y, menu_headers_); // Show the current menu item number in relation to total number if // items don't fit on the screen. -- cgit v1.2.3