From 4521b7027fd4305b7cb3a86607a8a0b0a2a48ca7 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 20 Jun 2017 18:11:21 -0700 Subject: 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) --- screen_ui.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'screen_ui.h') diff --git a/screen_ui.h b/screen_ui.h index fd9f471e9..e961c1c93 100644 --- a/screen_ui.h +++ b/screen_ui.h @@ -72,6 +72,11 @@ class ScreenRecoveryUI : public RecoveryUI { void SetColor(UIElement e); protected: + // The margin that we don't want to use for showing texts (e.g. round screen, or screen with + // rounded corners). + const int kMarginWidth; + const int kMarginHeight; + // The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi. const float density_; @@ -138,11 +143,6 @@ class ScreenRecoveryUI : public RecoveryUI { int char_width_; int char_height_; - // The margin that we don't want to use for showing texts (e.g. round screen, or screen with - // rounded corners). - int margin_width_; - int margin_height_; - pthread_mutex_t updateMutex; virtual bool InitTextParams(); -- cgit v1.2.3