From 0ba21cff07ceafeaa43e17aa26e341d961f6f29f Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Thu, 10 Mar 2016 14:51:25 -0800 Subject: recovery: Remove duplicate variables and functions The function that modifies rtl_locale exists only in the base class, and so the variable should not have a duplicate in the derived class, otherwise there may be incosistent values when it is read by the derived class (the thinking being that invoking the function will modify the base class version of the variable, and not the derived class version). Remove the updateMutex variable, and instead re-use the one in the base class. Also remove LoadBitmap from WearUI since it is identical to the one in ScreenRecoveryUI. Bug: 27407422 Change-Id: Idd823fa93dfa16d7b2c9c7160f8d0c2559d28731 --- screen_ui.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index 08a5f44a9..6d1191087 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -71,9 +71,7 @@ class ScreenRecoveryUI : public RecoveryUI { Icon currentIcon; int installingFrame; const char* locale; - bool rtl_locale; - pthread_mutex_t updateMutex; GRSurface* backgroundIcon[5]; GRSurface* backgroundText[5]; GRSurface** installation; @@ -136,9 +134,12 @@ class ScreenRecoveryUI : public RecoveryUI { void DrawTextLine(int* y, const char* line, bool bold); void DrawTextLines(int* y, const char* const* lines); - void LoadBitmap(const char* filename, GRSurface** surface); void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface); void LoadLocalizedBitmap(const char* filename, GRSurface** surface); + protected: + pthread_mutex_t updateMutex; + bool rtl_locale; + void LoadBitmap(const char* filename, GRSurface** surface); }; #endif // RECOVERY_UI_H -- cgit v1.2.3