From 04e5a40f2cfdf0cdd05c50e2359067175971d8ed Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Tue, 10 Dec 2019 15:35:36 +0900 Subject: [PATCH] Define ro.product.vndk.version Use ro.product.vndk.version to show the VNDK version that the product partition is using. When PRODUCT_PRODUCT_VNDK_VERSION is set, add ro.product.vndk.version in /product/build.prop. If PRODUCT_PRODUCT_VNDK_VERSION is "current", ro.product.vndk.version will have the VNDK version in PLATFORM_VNDK_VERSION. Otherwise, it will have the value defined in PRODUCT_PRODUCT_VNDK_VERSION. Bug: 144534640 Test: Check if /product/build.prop has "ro.product.vndk.version" Change-Id: If5e7e3a6c155de45f88f68700f16175656896afe --- core/main.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/main.mk b/core/main.mk index e24065c522..b51603df03 100644 --- a/core/main.mk +++ b/core/main.mk @@ -232,6 +232,17 @@ ADDITIONAL_BUILD_PROPERTIES += $(foreach s,$(SANITIZE_TARGET),ro.sanitize.$(s)=t # mount system_other partition. ADDITIONAL_DEFAULT_PROPERTIES += ro.postinstall.fstab.prefix=/system +# Set ro.product.vndk.version to know the VNDK version required by product +# modules. It uses the version in PRODUCT_PRODUCT_VNDK_VERSION. If the value +# is "current", use PLATFORM_VNDK_VERSION. +ifdef PRODUCT_PRODUCT_VNDK_VERSION +ifeq ($(PRODUCT_PRODUCT_VNDK_VERSION),current) +ADDITIONAL_PRODUCT_PROPERTIES += ro.product.vndk.version=$(PLATFORM_VNDK_VERSION) +else +ADDITIONAL_PRODUCT_PROPERTIES += ro.product.vndk.version=$(PRODUCT_PRODUCT_VNDK_VERSION) +endif +endif + # ----------------------------------------------------------------- ### ### In this section we set up the things that are different