From 404ccc83c4ad9dd6cd151d8cc4299c4d3f02b2b7 Mon Sep 17 00:00:00 2001 From: Vikas Marwaha Date: Fri, 3 Jun 2016 15:02:06 -0700 Subject: [PATCH] Add variable PRODUCT_SHIPPING_API_LEVEL and make files with the new read only product property ro.product.first_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. Change-Id: If54202075d3b92ed380655cde8b3fc50c5ba73b3 --- core/product.mk | 2 +- core/product_config.mk | 6 ++++++ target/product/product_launched_with_l.mk | 3 +++ target/product/product_launched_with_l_mr1.mk | 2 ++ target/product/product_launched_with_m.mk | 2 ++ target/product/product_launched_with_n.mk | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 target/product/product_launched_with_l.mk create mode 100644 target/product/product_launched_with_l_mr1.mk create mode 100644 target/product/product_launched_with_m.mk create mode 100644 target/product/product_launched_with_n.mk diff --git a/core/product.mk b/core/product.mk index 7043cffa3..4f780f9c1 100644 --- a/core/product.mk +++ b/core/product.mk @@ -120,7 +120,7 @@ _product_var_list := \ PRODUCT_DEX_PREOPT_MODULE_CONFIGS \ PRODUCT_DEX_PREOPT_DEFAULT_FLAGS \ PRODUCT_DEX_PREOPT_BOOT_FLAGS \ - + PRODUCT_SHIPPING_API_LEVEL \ define dump-product $(info ==== $(1) ====)\ diff --git a/core/product_config.mk b/core/product_config.mk index 6aefa8de5..a4063f1ee 100644 --- a/core/product_config.mk +++ b/core/product_config.mk @@ -355,6 +355,12 @@ PRODUCT_PROPERTY_OVERRIDES := \ PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_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 + # Should we use the default resources or add any product specific overlays PRODUCT_PACKAGE_OVERLAYS := \ $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_PACKAGE_OVERLAYS)) diff --git a/target/product/product_launched_with_l.mk b/target/product/product_launched_with_l.mk new file mode 100644 index 000000000..8127bc31c --- /dev/null +++ b/target/product/product_launched_with_l.mk @@ -0,0 +1,3 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launced on. +PRODUCT_SHIPPING_API_LEVEL := 21 + diff --git a/target/product/product_launched_with_l_mr1.mk b/target/product/product_launched_with_l_mr1.mk new file mode 100644 index 000000000..7a5bd0f2d --- /dev/null +++ b/target/product/product_launched_with_l_mr1.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launced on. +PRODUCT_SHIPPING_API_LEVEL := 22 diff --git a/target/product/product_launched_with_m.mk b/target/product/product_launched_with_m.mk new file mode 100644 index 000000000..afd8647dd --- /dev/null +++ b/target/product/product_launched_with_m.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launced on. +PRODUCT_SHIPPING_API_LEVEL := 23 diff --git a/target/product/product_launched_with_n.mk b/target/product/product_launched_with_n.mk new file mode 100644 index 000000000..f7c5d794d --- /dev/null +++ b/target/product/product_launched_with_n.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launced on. +PRODUCT_SHIPPING_API_LEVEL := 24