aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2017-06-20 20:11:21 -0500
committerTao Bao2017-06-23 11:22:34 -0500
commit4521b7027fd4305b7cb3a86607a8a0b0a2a48ca7 (patch)
treea9fbc5c5fff9bf9c77b7b403076078fa182d7377 /screen_ui.h
parent171b4c4cbe6ba5af3fd7df87d227eda44e308727 (diff)
downloadplatform-bootable-recovery-4521b7027fd4305b7cb3a86607a8a0b0a2a48ca7.tar.gz
platform-bootable-recovery-4521b7027fd4305b7cb3a86607a8a0b0a2a48ca7.tar.xz
platform-bootable-recovery-4521b7027fd4305b7cb3a86607a8a0b0a2a48ca7.zip
Use Makefile variables to specify margin settings.
Instead of defining device-specific UI class, this CL allows using Makefile variables to specify margin values directly. Values explicitly defined via TARGET_RECOVERY_UI_MARGIN_HEIGHT and TARGET_RECOVERY_UI_MARGIN_WIDTH will be used. Otherwise they will default to zero. Bug: 62732748 Test: Specify the height and width and check recovery texts. Change-Id: Icb6f7466c8d407f877b93da38aebfdf7e6b41be7 (cherry picked from commit a92d8fb45676566a56d7c27d2e8fb644523adc94)
Diffstat (limited to 'screen_ui.h')
-rw-r--r--screen_ui.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/screen_ui.h b/screen_ui.h
index fd9f471e..e961c1c9 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -72,6 +72,11 @@ class ScreenRecoveryUI : public RecoveryUI {
72 void SetColor(UIElement e); 72 void SetColor(UIElement e);
73 73
74 protected: 74 protected:
75 // The margin that we don't want to use for showing texts (e.g. round screen, or screen with
76 // rounded corners).
77 const int kMarginWidth;
78 const int kMarginHeight;
79
75 // The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi. 80 // The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi.
76 const float density_; 81 const float density_;
77 82
@@ -138,11 +143,6 @@ class ScreenRecoveryUI : public RecoveryUI {
138 int char_width_; 143 int char_width_;
139 int char_height_; 144 int char_height_;
140 145
141 // The margin that we don't want to use for showing texts (e.g. round screen, or screen with
142 // rounded corners).
143 int margin_width_;
144 int margin_height_;
145
146 pthread_mutex_t updateMutex; 146 pthread_mutex_t updateMutex;
147 147
148 virtual bool InitTextParams(); 148 virtual bool InitTextParams();