aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-06-24 00:47:03 -0500
committerTao Bao2017-06-24 01:06:01 -0500
commit99b2d774751041a5cfb5a48ac93292bb92acef98 (patch)
treecf0e859e660be2b9f2a3384c65c67492728ae190 /screen_ui.h
parent5d2e3bd109539282d1829e3579c1f762a9486382 (diff)
downloadplatform-bootable-recovery-99b2d774751041a5cfb5a48ac93292bb92acef98.tar.gz
platform-bootable-recovery-99b2d774751041a5cfb5a48ac93292bb92acef98.tar.xz
platform-bootable-recovery-99b2d774751041a5cfb5a48ac93292bb92acef98.zip
Add override specifier and member constness to RecoveryUI classes.
Test: mmma bootable/recovery Change-Id: I66e328614423488a4027d7878f4569fbf3a3721e
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/screen_ui.h b/screen_ui.h
index 2a3d8c30..e8d3c322 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -36,8 +36,8 @@ class ScreenRecoveryUI : public RecoveryUI {
36 bool Init(const std::string& locale) override; 36 bool Init(const std::string& locale) override;
37 37
38 // overall recovery state ("background image") 38 // overall recovery state ("background image")
39 void SetBackground(Icon icon); 39 void SetBackground(Icon icon) override;
40 void SetSystemUpdateText(bool security_update); 40 void SetSystemUpdateText(bool security_update) override;
41 41
42 // progress indicator 42 // progress indicator
43 void SetProgressType(ProgressType type) override; 43 void SetProgressType(ProgressType type) override;
@@ -52,16 +52,17 @@ class ScreenRecoveryUI : public RecoveryUI {
52 bool WasTextEverVisible() override; 52 bool WasTextEverVisible() override;
53 53
54 // printing messages 54 // printing messages
55 void Print(const char* fmt, ...) __printflike(2, 3); 55 void Print(const char* fmt, ...) override __printflike(2, 3);
56 void PrintOnScreenOnly(const char* fmt, ...) __printflike(2, 3); 56 void PrintOnScreenOnly(const char* fmt, ...) override __printflike(2, 3);
57 void ShowFile(const char* filename); 57 void ShowFile(const char* filename) override;
58 58
59 // menu display 59 // menu display
60 void StartMenu(const char* const* headers, const char* const* items, int initial_selection); 60 void StartMenu(const char* const* headers, const char* const* items,
61 int SelectMenu(int sel); 61 int initial_selection) override;
62 void EndMenu(); 62 int SelectMenu(int sel) override;
63 void EndMenu() override;
63 64
64 void KeyLongPress(int); 65 void KeyLongPress(int) override;
65 66
66 void Redraw(); 67 void Redraw();
67 68
@@ -75,7 +76,7 @@ class ScreenRecoveryUI : public RecoveryUI {
75 TEXT_FILL, 76 TEXT_FILL,
76 INFO 77 INFO
77 }; 78 };
78 void SetColor(UIElement e); 79 void SetColor(UIElement e) const;
79 80
80 protected: 81 protected:
81 // The margin that we don't want to use for showing texts (e.g. round screen, or screen with 82 // The margin that we don't want to use for showing texts (e.g. round screen, or screen with
@@ -158,8 +159,8 @@ class ScreenRecoveryUI : public RecoveryUI {
158 virtual void update_screen_locked(); 159 virtual void update_screen_locked();
159 virtual void update_progress_locked(); 160 virtual void update_progress_locked();
160 161
161 GRSurface* GetCurrentFrame(); 162 GRSurface* GetCurrentFrame() const;
162 GRSurface* GetCurrentText(); 163 GRSurface* GetCurrentText() const;
163 164
164 static void* ProgressThreadStartRoutine(void* data); 165 static void* ProgressThreadStartRoutine(void* data);
165 void ProgressThreadLoop(); 166 void ProgressThreadLoop();
@@ -174,11 +175,11 @@ class ScreenRecoveryUI : public RecoveryUI {
174 void LoadLocalizedBitmap(const char* filename, GRSurface** surface); 175 void LoadLocalizedBitmap(const char* filename, GRSurface** surface);
175 176
176 int PixelsFromDp(int dp) const; 177 int PixelsFromDp(int dp) const;
177 virtual int GetAnimationBaseline(); 178 virtual int GetAnimationBaseline() const;
178 virtual int GetProgressBaseline(); 179 virtual int GetProgressBaseline() const;
179 virtual int GetTextBaseline(); 180 virtual int GetTextBaseline() const;
180 181
181 virtual void DrawHorizontalRule(int* y); 182 virtual void DrawHorizontalRule(int* y) const;
182 virtual void DrawHighlightBar(int x, int y, int width, int height) const; 183 virtual void DrawHighlightBar(int x, int y, int width, int height) const;
183 virtual void DrawTextLine(int x, int* y, const char* line, bool bold) const; 184 virtual void DrawTextLine(int x, int* y, const char* line, bool bold) const;
184 void DrawTextLines(int x, int* y, const char* const* lines) const; 185 void DrawTextLines(int x, int* y, const char* const* lines) const;