From 000e31c9ed8b8753b922db7416f6496254747920 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Wed, 28 Feb 2024 20:54:14 +0900 Subject: [PATCH] Define PRODUCT_SHIPPING_VENDOR_API_LEVEL Devices may set its first vendor api level to PRODUCT_SHIPPING_VENDOR_API_LEVEL. This will manually set to ro.vendor.api_level and will be used by tests. If this value is not defined, init process will automatically calculate the ro.vendor.api_level property for tests. Bug: 326164316 Test: Check vendor/build.prop Change-Id: I89f844ffaad9e3e39deab1c680bd1f7f17f4d8ad --- core/main.mk | 5 +++++ core/product.mk | 3 +++ 2 files changed, 8 insertions(+) diff --git a/core/main.mk b/core/main.mk index b4ca2a49b9..c1cafc0c89 100644 --- a/core/main.mk +++ b/core/main.mk @@ -284,6 +284,11 @@ ADDITIONAL_VENDOR_PROPERTIES += \ ro.product.first_api_level=$(PRODUCT_SHIPPING_API_LEVEL) endif +ifdef PRODUCT_SHIPPING_VENDOR_API_LEVEL +ADDITIONAL_VENDOR_PROPERTIES += \ + ro.vendor.api_level=$(PRODUCT_SHIPPING_VENDOR_API_LEVEL) +endif + ifneq ($(TARGET_BUILD_VARIANT),user) ifdef PRODUCT_SET_DEBUGFS_RESTRICTIONS ADDITIONAL_VENDOR_PROPERTIES += \ diff --git a/core/product.mk b/core/product.mk index 60cab47b5b..d64dde2c68 100644 --- a/core/product.mk +++ b/core/product.mk @@ -230,6 +230,9 @@ _product_single_value_vars += PRODUCT_SYSTEM_DLKM_BASE_FS_PATH # The first API level this product shipped with _product_single_value_vars += PRODUCT_SHIPPING_API_LEVEL +# The first vendor API level this product shipped with +_product_single_value_vars += PRODUCT_SHIPPING_VENDOR_API_LEVEL + _product_list_vars += VENDOR_PRODUCT_RESTRICT_VENDOR_FILES _product_list_vars += VENDOR_EXCEPTION_MODULES _product_list_vars += VENDOR_EXCEPTION_PATHS