Expose libminui related variables as vendor default properties.

TARGET_RECOVERY_DEFAULT_ROTATION, TARGET_RECOVERY_OVERSCAN_PERCENT and
TARGET_RECOVERY_PIXEL_FORMAT are vendor-specific properties used by
libminui. So they are needed by both of recovery and charger modes.

We used to pass them to libminui as build-time flags (pre-Q), and
switched them to runtime properties recently (available to recovery
only). Since /sbin/charger lives on system image, the values should be
still passed as runtime properties, but need to be additionally
available under charger mode, and overridable by vendor-init.

This CL writes these variables as vendor default properties (i.e.
/vendor/default.prop if property_overrides_split_enabled is true,
otherwise into /default.prop). Note that writing them as vendor build
properties doesn't work, as init doesn't load /vendor/build.prop under
charger mode.

Bug: 113567255
Test: Build along with other CLs in the topic (for sepolicy and
      libminui changes). Boot into charger mode.
Test: Boot into recovery. Run graphics test.
Change-Id: Iccc4de0fbff508d489fc93b45c2ecfd0fb96053c
This commit is contained in:
Tao Bao 2018-09-04 11:42:53 -07:00
parent 71034e3764
commit 5f99923ef1
1 changed files with 15 additions and 3 deletions

View File

@ -144,6 +144,21 @@ else
endif
FINAL_VENDOR_DEFAULT_PROPERTIES += \
$(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
# Although these variables are prefixed with TARGET_RECOVERY_, they are also needed under charger
# mode (via libminui).
ifdef TARGET_RECOVERY_DEFAULT_ROTATION
FINAL_VENDOR_DEFAULT_PROPERTIES += \
ro.minui.default_rotation=$(TARGET_RECOVERY_DEFAULT_ROTATION)
endif
ifdef TARGET_RECOVERY_OVERSCAN_PERCENT
FINAL_VENDOR_DEFAULT_PROPERTIES += \
ro.minui.overscan_percent=$(TARGET_RECOVERY_OVERSCAN_PERCENT)
endif
ifdef TARGET_RECOVERY_PIXEL_FORMAT
FINAL_VENDOR_DEFAULT_PROPERTIES += \
ro.minui.pixel_format=$(TARGET_RECOVERY_PIXEL_FORMAT)
endif
FINAL_VENDOR_DEFAULT_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_VENDOR_DEFAULT_PROPERTIES),=)
@ -1557,9 +1572,6 @@ endif
INSTALLED_RECOVERY_BUILD_PROP_TARGET := $(TARGET_RECOVERY_ROOT_OUT)/prop.default
$(INSTALLED_RECOVERY_BUILD_PROP_TARGET): PRIVATE_RECOVERY_UI_PROPERTIES := \
TARGET_RECOVERY_DEFAULT_ROTATION:default_rotation \
TARGET_RECOVERY_OVERSCAN_PERCENT:overscan_percent \
TARGET_RECOVERY_PIXEL_FORMAT:pixel_format \
TARGET_RECOVERY_UI_ANIMATION_FPS:animation_fps \
TARGET_RECOVERY_UI_MARGIN_HEIGHT:margin_height \
TARGET_RECOVERY_UI_MARGIN_WIDTH:margin_width \