Add PRODUCT_FULL_TREBLE.
PRODUCT_FULL_TREBLE: whether the device has Treble fully enabled (no
passthrough hals, vendor.img, split sepolicy, etc..)
PRODUCT_FULL_TREBLE_OVERRIDE: used if someone wants to consider a device
as full Treble even if it didn't launch with Android O.
Bug: 35809750
Test: PRODUCT_FULL_TREBLE set appropriately with
PRODUCT_FULL_TREBLE_OVERRIDE and PRODUCT_SHIPPING_API_LEVEL = 24/25
Change-Id: I069448beaf26c70acb6c45d4228d8fdfe9476410
diff --git a/core/main.mk b/core/main.mk
index 739fc11..7433f90 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -343,6 +343,16 @@
ADDITIONAL_BUILD_PROPERTIES += ro.bionic.ld.warning=1
endif
+# Boolean variable determining if Treble is fully enabled
+PRODUCT_FULL_TREBLE := false
+ifeq ($(PRODUCT_FULL_TREBLE_OVERRIDE),true)
+ PRODUCT_FULL_TREBLE := true
+else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
+ #$(warning no product shipping level defined)
+else ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),)
+ PRODUCT_FULL_TREBLE := true
+endif
+
# -----------------------------------------------------------------
###
### In this section we set up the things that are different