screen_ui: Allow setting screen margin space.

For round screen or screens with rounded corners, we don't want to show
texts within the margin which could otherwise be invisible.

Move the density computation to ScreenRecoveryUI ctor so that the value
can be used earlier.

Note that this is similar to the existing stuff in wear UI (outer_width,
outer_height). This CL gets ScreenRecoveryUI and WearRecoveryUI one-step
closer.

Bug: 62732748
Test: Setting and not setting margin_{width,height}_ on angler. Check the
      recovery texts (recovery menu as well as 'View recovery logs').
Change-Id: Ibf6238c9cc8949a42ed8a410e1c09d55b0b5a151
diff --git a/screen_ui.h b/screen_ui.h
index bd99254..fd9f471 100644
--- a/screen_ui.h
+++ b/screen_ui.h
@@ -72,10 +72,11 @@
     void SetColor(UIElement e);
 
   protected:
+    // The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi.
+    const float density_;
+
     Icon currentIcon;
 
-    // The scale factor from dp to pixels. 1.0 for mdpi, 4.0 for xxxhdpi.
-    float density_;
     // The layout to use.
     int layout_;
 
@@ -136,6 +137,12 @@
 
     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();