From 93e46ad42658fd61104d0c3998ec5c7da2042179 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 2 May 2018 14:57:21 -0700 Subject: screen_ui: Use std::string in DrawTextLine() and siblings. Test: mmma -j bootable/recovery Test: Build and boot into recovery image on angler. Check the UI. Test: Repeat the same test on devices using wearable UI. Change-Id: I1a67ff4ae8de4d7a8dc66326cf07f95c89e95152 --- wear_ui.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'wear_ui.cpp') diff --git a/wear_ui.cpp b/wear_ui.cpp index 118e43508..e4473ba5c 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -61,13 +61,6 @@ void WearRecoveryUI::draw_background_locked() { } } -static const char* SWIPE_HELP[] = { - "Swipe up/down to move.", - "Swipe left/right to select.", - "", - nullptr, -}; - void WearRecoveryUI::draw_screen_locked() { draw_background_locked(); if (!show_text) { @@ -76,6 +69,13 @@ void WearRecoveryUI::draw_screen_locked() { SetColor(TEXT_FILL); gr_fill(0, 0, gr_fb_width(), gr_fb_height()); + // clang-format off + static std::vector SWIPE_HELP = { + "Swipe up/down to move.", + "Swipe left/right to select.", + "", + }; + // clang-format on draw_menu_and_text_buffer_locked(SWIPE_HELP); } } @@ -99,4 +99,4 @@ void WearRecoveryUI::StartMenu(const char* const* headers, const char* const* it update_screen_locked(); } pthread_mutex_unlock(&updateMutex); -} \ No newline at end of file +} -- cgit v1.2.3