aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrashant Malani2016-03-10 16:51:25 -0600
committerPrashant Malani2016-03-10 17:36:31 -0600
commit0ba21cff07ceafeaa43e17aa26e341d961f6f29f (patch)
tree952df7e80dff00b8ad1d091d8a4bf65e31d16c88 /screen_ui.h
parentd345de66efb919e8c0d09ee5b4d8ae0d443d6c94 (diff)
downloadplatform-bootable-recovery-0ba21cff07ceafeaa43e17aa26e341d961f6f29f.tar.gz
platform-bootable-recovery-0ba21cff07ceafeaa43e17aa26e341d961f6f29f.tar.xz
platform-bootable-recovery-0ba21cff07ceafeaa43e17aa26e341d961f6f29f.zip
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
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 08a5f44a..6d119108 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -71,9 +71,7 @@ class ScreenRecoveryUI : public RecoveryUI {
71 Icon currentIcon; 71 Icon currentIcon;
72 int installingFrame; 72 int installingFrame;
73 const char* locale; 73 const char* locale;
74 bool rtl_locale;
75 74
76 pthread_mutex_t updateMutex;
77 GRSurface* backgroundIcon[5]; 75 GRSurface* backgroundIcon[5];
78 GRSurface* backgroundText[5]; 76 GRSurface* backgroundText[5];
79 GRSurface** installation; 77 GRSurface** installation;
@@ -136,9 +134,12 @@ class ScreenRecoveryUI : public RecoveryUI {
136 void DrawTextLine(int* y, const char* line, bool bold); 134 void DrawTextLine(int* y, const char* line, bool bold);
137 void DrawTextLines(int* y, const char* const* lines); 135 void DrawTextLines(int* y, const char* const* lines);
138 136
139 void LoadBitmap(const char* filename, GRSurface** surface);
140 void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface); 137 void LoadBitmapArray(const char* filename, int* frames, int* fps, GRSurface*** surface);
141 void LoadLocalizedBitmap(const char* filename, GRSurface** surface); 138 void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
139 protected:
140 pthread_mutex_t updateMutex;
141 bool rtl_locale;
142 void LoadBitmap(const char* filename, GRSurface** surface);
142}; 143};
143 144
144#endif // RECOVERY_UI_H 145#endif // RECOVERY_UI_H