ui: Read custom recovery UI values via system property.
The matching change to build system now writes these values as build
properties for recovery image. This allows us dropping the dependency on
Android.mk (as well as having more flexibility to do UI customization).
Also rename a few constant names, as the naming doesn't fully follow the
style guide (which reads "whose value is fixed for the duration of the
program").
Bug: 110380063
Test: Build and flash recovery image on taimen, which uses custom margin
height. Check the UI and choose `Run graphics test`.
Change-Id: I2c50326123639cb36022f51b62cdeed925d77ba7
diff --git a/screen_ui.h b/screen_ui.h
index b76d470..f08f4f4 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -158,14 +158,14 @@
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;
+ const int margin_width_;
+ const int margin_height_;
// Number of frames per sec (default: 30) for both parts of the animation.
- const int kAnimationFps;
+ const int animation_fps_;
// The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi.
- const float kDensity;
+ const float density_;
virtual bool InitTextParams();