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 --- screen_ui.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 986959c69..b0cbbdb90 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -178,7 +178,7 @@ class ScreenRecoveryUI : public RecoveryUI { virtual void draw_background_locked(); virtual void draw_foreground_locked(); virtual void draw_screen_locked(); - virtual void draw_menu_and_text_buffer_locked(const char* const* help_message); + virtual void draw_menu_and_text_buffer_locked(const std::vector& help_message); virtual void update_screen_locked(); virtual void update_progress_locked(); @@ -212,7 +212,7 @@ class ScreenRecoveryUI : public RecoveryUI { // Draws a horizontal rule at Y. Returns the offset it should be moving along Y-axis. virtual int DrawHorizontalRule(int y) const; // Draws a line of text. Returns the offset it should be moving along Y-axis. - virtual int DrawTextLine(int x, int y, const char* line, bool bold) const; + virtual int DrawTextLine(int x, int y, const std::string& line, bool bold) const; // Draws surface portion (sx, sy, w, h) at screen location (dx, dy). virtual void DrawSurface(GRSurface* surface, int sx, int sy, int w, int h, int dx, int dy) const; // Draws rectangle at (x, y) - (x + w, y + h). @@ -220,10 +220,10 @@ class ScreenRecoveryUI : public RecoveryUI { // Draws given surface (surface->pixel_bytes = 1) as text at (x, y). virtual void DrawTextIcon(int x, int y, GRSurface* surface) const; // Draws multiple text lines. Returns the offset it should be moving along Y-axis. - int DrawTextLines(int x, int y, const char* const* lines) const; + int DrawTextLines(int x, int y, const std::vector& lines) const; // Similar to DrawTextLines() to draw multiple text lines, but additionally wraps long lines. // Returns the offset it should be moving along Y-axis. - int DrawWrappedTextLines(int x, int y, const char* const* lines) const; + int DrawWrappedTextLines(int x, int y, const std::vector& lines) const; Icon currentIcon; -- cgit v1.2.3