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
diff --git a/screen_ui.h b/screen_ui.h
index 6d11910..9e1b2df 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -131,15 +131,17 @@
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