Enforce TARGET_USES_MKE2FS := true for new devices
am: e49ee7095f
Change-Id: I0a79501423f055a87d18fcc73e03492be944a155
diff --git a/core/config.mk b/core/config.mk
index b853d36..46c63f3 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -729,6 +729,14 @@
PRODUCT_FULL_TREBLE := true
endif
+ifdef PRODUCT_SHIPPING_API_LEVEL
+ ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),27),)
+ ifneq ($(TARGET_USES_MKE2FS),true)
+ $(error When PRODUCT_SHIPPING_API_LEVEL >= 27, TARGET_USES_MKE2FS must be true)
+ endif
+ endif
+endif
+
# The default key if not set as LOCAL_CERTIFICATE
ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE
DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE)
diff --git a/target/product/product_launched_with_o_mr1.mk b/target/product/product_launched_with_o_mr1.mk
new file mode 100644
index 0000000..25620aa
--- /dev/null
+++ b/target/product/product_launched_with_o_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 := 27