From b31b9bad6697cf81647703332ebd844c743fd241 Mon Sep 17 00:00:00 2001 From: Jaekyun Seok Date: Fri, 3 Nov 2017 15:18:55 +0900 Subject: [PATCH] Add PRODUCT_SYSTEM_DEFAULT_PROPERTIES PRODUCT_SYSTEM_DEFAULT_PROPERTIES will be used to define system default properties which should be installed in system partition. Bug: 64661857 Test: confirmed that ART default properties are stored in /system/etc/prop.default when they were defined in PRODUCT_SYSTEM_DEFAULT_PROPERTIES. Change-Id: Ia08c25d0c5805381c6e3fe63dd1d171e8d195b90 --- core/Makefile | 3 ++- core/product-graph.mk | 1 + core/product.mk | 1 + core/product_config.mk | 7 +++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 7fed9685a..4cbf8a94f 100644 --- a/core/Makefile +++ b/core/Makefile @@ -110,7 +110,8 @@ INSTALLED_DEFAULT_PROP_TARGET := $(TARGET_ROOT_OUT)/default.prop endif ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DEFAULT_PROP_TARGET) FINAL_DEFAULT_PROPERTIES := \ - $(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES)) + $(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES)) \ + $(call collapse-pairs, $(PRODUCT_SYSTEM_DEFAULT_PROPERTIES)) ifndef property_overrides_split_enabled FINAL_DEFAULT_PROPERTIES += \ $(call collapse-pairs, $(PRODUCT_DEFAULT_PROPERTY_OVERRIDES)) diff --git a/core/product-graph.mk b/core/product-graph.mk index 633ac37ac..268688a2d 100644 --- a/core/product-graph.mk +++ b/core/product-graph.mk @@ -103,6 +103,7 @@ $(OUT_DIR)/products/$(strip $(1)).txt: $(this_makefile) $(hide) echo 'PRODUCT_MANUFACTURER=$$(PRODUCTS.$(strip $(1)).PRODUCT_MANUFACTURER)' >> $$@ $(hide) echo 'PRODUCT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_PROPERTY_OVERRIDES)' >> $$@ $(hide) echo 'PRODUCT_DEFAULT_PROPERTY_OVERRIDES=$$(PRODUCTS.$(strip $(1)).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)' >> $$@ + $(hide) echo 'PRODUCT_SYSTEM_DEFAULT_PROPERTIES=$$(PRODUCTS.$(strip $(1)).PRODUCT_SYSTEM_DEFAULT_PROPERTIES)' >> $$@ $(hide) echo 'PRODUCT_CHARACTERISTICS=$$(PRODUCTS.$(strip $(1)).PRODUCT_CHARACTERISTICS)' >> $$@ $(hide) echo 'PRODUCT_COPY_FILES=$$(PRODUCTS.$(strip $(1)).PRODUCT_COPY_FILES)' >> $$@ $(hide) echo 'PRODUCT_OTA_PUBLIC_KEYS=$$(PRODUCTS.$(strip $(1)).PRODUCT_OTA_PUBLIC_KEYS)' >> $$@ diff --git a/core/product.mk b/core/product.mk index 1819293cc..1541cff94 100644 --- a/core/product.mk +++ b/core/product.mk @@ -112,6 +112,7 @@ _product_var_list := \ PRODUCT_SUPPORTS_VERITY \ PRODUCT_SUPPORTS_VERITY_FEC \ PRODUCT_OEM_PROPERTIES \ + PRODUCT_SYSTEM_DEFAULT_PROPERTIES \ PRODUCT_SYSTEM_PROPERTY_BLACKLIST \ PRODUCT_SYSTEM_SERVER_APPS \ PRODUCT_SYSTEM_SERVER_JARS \ diff --git a/core/product_config.mk b/core/product_config.mk index 777c29dbe..ff56c0ebe 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -358,6 +358,13 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_PROPERTY_OVERRIDES)) .KATI_READONLY := PRODUCT_DEFAULT_PROPERTY_OVERRIDES +# A list of property assignments, like "key = value", with zero or more +# whitespace characters on either side of the '='. +# used for adding properties to default.prop of system partition +PRODUCT_SYSTEM_DEFAULT_PROPERTIES := \ + $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SYSTEM_DEFAULT_PROPERTIES)) +.KATI_READONLY := PRODUCT_SYSTEM_DEFAULT_PROPERTIES + # Should we use the default resources or add any product specific overlays PRODUCT_PACKAGE_OVERLAYS := \ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS))