From 7a491225bbbb24593a4eda5dabe2fc1850d60dd1 Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Fri, 11 Mar 2016 10:00:55 -0800 Subject: recovery: Remove SetColor, and other refactoring for WearUI The only difference from SetColor in ScreenRecoveryUI is the that the LOG messages have slightly different colors. That's not enough to warrant a duplicate function. So this patch removes SetColor and uses the parent class version. This patch also moves the DrawTextLine* functions into ScreenRecoveryUI since they're mostly the same. It also moves char_width and char_height into the class instead of keeping them as static variables. Bug: 27407422 Change-Id: I30428c9433baab8410cf710a01c9b1c44c217bf1 --- screen_ui.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 6d1191087..9e1b2dfa1 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -131,15 +131,17 @@ class ScreenRecoveryUI : public RecoveryUI { void ClearText(); void DrawHorizontalRule(int* y); - void DrawTextLine(int* y, const char* line, bool bold); - void DrawTextLines(int* y, const char* const* lines); void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface); void LoadLocalizedBitmap(const char* filename, GRSurface** surface); protected: + int char_width_; + int char_height_; pthread_mutex_t updateMutex; bool rtl_locale; void LoadBitmap(const char* filename, GRSurface** surface); + void DrawTextLine(int x, int* y, const char* line, bool bold); + void DrawTextLines(int x, int* y, const char* const* lines); }; #endif // RECOVERY_UI_H -- cgit v1.2.3