Enforce PRODUCT_COMPATIBLE_PROPERTY for products shipping with Android P

PRODUCT_COMPATIBLE_PROPERTY will be set as true for products shipping
with Android P, and ro.actionable_compatible_property.enabled will be set
as a system default property accordingly.
But if PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE is set,
ro.actionable_compatible_property.enabled will be false.

Bug: 38146102
Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true
Merged-In: Ifc1279a360b140c4d94edd32db7de3c6c7317297
Change-Id: Ifc1279a360b140c4d94edd32db7de3c6c7317297
(cherry picked from commit 2528cd26c0)
This commit is contained in:
Jaekyun Seok 2018-01-16 14:14:59 +09:00
parent 3fbfab7896
commit 0538ff796f
4 changed files with 31 additions and 0 deletions

View File

@ -742,6 +742,19 @@ APICHECK_CLASSPATH := $(subst $(space),:,$(strip $(APICHECK_CLASSPATH_ENTRIES)))
APICHECK_COMMAND := $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)" APICHECK_COMMAND := $(APICHECK) -JXmx1024m -J"classpath $(APICHECK_CLASSPATH)"
# Boolean variable determining if the whitelist for compatible properties is enabled
PRODUCT_COMPATIBLE_PROPERTY := false
ifneq ($(PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE),)
PRODUCT_COMPATIBLE_PROPERTY := $(PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE)
else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),)
#$(warning no product shipping level defined)
else ifneq ($(call math_lt,27,$(PRODUCT_SHIPPING_API_LEVEL)),)
PRODUCT_COMPATIBLE_PROPERTY := true
endif
.KATI_READONLY := \
PRODUCT_COMPATIBLE_PROPERTY
# Boolean variable determining if Treble is fully enabled # Boolean variable determining if Treble is fully enabled
PRODUCT_FULL_TREBLE := false PRODUCT_FULL_TREBLE := false
ifneq ($(PRODUCT_FULL_TREBLE_OVERRIDE),) ifneq ($(PRODUCT_FULL_TREBLE_OVERRIDE),)

View File

@ -205,6 +205,14 @@ $(KATI_obsolete_var PRODUCT_FULL_TREBLE,\
variables like PRODUCT_SEPOLICY_SPLIT should be used until that is \ variables like PRODUCT_SEPOLICY_SPLIT should be used until that is \
possible.) possible.)
# Sets ro.actionable_compatible_property.enabled to know on runtime whether the whitelist
# of actionable compatible properties is enabled or not.
ifeq ($(PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE),true)
ADDITIONAL_DEFAULT_PROPERTIES += ro.actionable_compatible_property.enabled=false
else
ADDITIONAL_DEFAULT_PROPERTIES += ro.actionable_compatible_property.enabled=${PRODUCT_COMPATIBLE_PROPERTY}
endif
# ----------------------------------------------------------------- # -----------------------------------------------------------------
### ###
### In this section we set up the things that are different ### In this section we set up the things that are different

View File

@ -149,6 +149,8 @@ _product_var_list := \
PRODUCT_ADB_KEYS \ PRODUCT_ADB_KEYS \
PRODUCT_CFI_INCLUDE_PATHS \ PRODUCT_CFI_INCLUDE_PATHS \
PRODUCT_CFI_EXCLUDE_PATHS \ PRODUCT_CFI_EXCLUDE_PATHS \
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \
PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \
define dump-product define dump-product
$(info ==== $(1) ====)\ $(info ==== $(1) ====)\

View File

@ -484,3 +484,11 @@ PRODUCT_CFI_INCLUDE_PATHS := \
# which Soong namespaces to export to Make # which Soong namespaces to export to Make
PRODUCT_SOONG_NAMESPACES := PRODUCT_SOONG_NAMESPACES :=
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SOONG_NAMESPACES)) $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SOONG_NAMESPACES))
# A flag to override PRODUCT_COMPATIBLE_PROPERTY
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE))
# Whether the whitelist of actionable compatible properties should be disabled or not
PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE))