Add variable PRODUCT_SHIPPING_API_LEVEL.
PRODUCT_SHIPPING_API_LEVEL declares which API level a device first
shipped with.
We use this variable to set a read-only property that can be used in
CTS/GTS tests.
Bug: 26381401
Change-Id: I9dfeaf423146c35f57e69ac26c27e8a9e205bc4f
diff --git a/core/product.mk b/core/product.mk
index 5b6a86c..94cc2e3 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -122,6 +122,7 @@
PRODUCT_DEX_PREOPT_BOOT_FLAGS \
PRODUCT_SYSTEM_BASE_FS_PATH \
PRODUCT_VENDOR_BASE_FS_PATH \
+ PRODUCT_SHIPPING_API_LEVEL \
diff --git a/core/product_config.mk b/core/product_config.mk
index c0a1a9d..ed38bc8 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -351,6 +351,12 @@
PRODUCT_PROPERTY_OVERRIDES := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PROPERTY_OVERRIDES))
+PRODUCT_SHIPPING_API_LEVEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SHIPPING_API_LEVEL))
+ifdef PRODUCT_SHIPPING_API_LEVEL
+ADDITIONAL_BUILD_PROPERTIES += \
+ ro.product.first_api_level=$(PRODUCT_SHIPPING_API_LEVEL)
+endif
+
# 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