Skip to content
Snippets Groups Projects
Commit 0d233837 authored by Tri Vo's avatar Tri Vo
Browse files

Don't check PRODUCT_SHIPPING_API_LEVEL to determine fake treble.

Emulator device can not be considered a full treble device even though
it has PRODUCT_SHIPPING_API_LEVEL = 28. This is prevents us from merging
neverallow rules that implement Treble requirements (aosp/798433). As a
temporary workaround, disable the checks on that variable.

Bug: 112933807
Bug: 113124961
Bug: 111243627
Test: m selinux_policy
Change-Id: I9a29c01dfcbc70e4ba1e4eef233355bc18ec2108
parent 33442f57
No related branches found
No related tags found
No related merge requests found
...@@ -89,20 +89,18 @@ $(treble_sepolicy_tests_$(version)): PRIVATE_PLAT_SEPOLICY := $(built_plat_sepol ...@@ -89,20 +89,18 @@ $(treble_sepolicy_tests_$(version)): PRIVATE_PLAT_SEPOLICY := $(built_plat_sepol
$(treble_sepolicy_tests_$(version)): PRIVATE_PLAT_PUB_SEPOLICY := $(base_plat_pub_policy.cil) $(treble_sepolicy_tests_$(version)): PRIVATE_PLAT_PUB_SEPOLICY := $(base_plat_pub_policy.cil)
$(treble_sepolicy_tests_$(version)): PRIVATE_FAKE_TREBLE := $(treble_sepolicy_tests_$(version)): PRIVATE_FAKE_TREBLE :=
ifeq ($(PRODUCT_FULL_TREBLE_OVERRIDE),true) ifeq ($(PRODUCT_FULL_TREBLE_OVERRIDE),true)
# TODO(b/113124961): undefined PRODUCT_SHIPPING_API_LEVEL should default to full # TODO(b/113124961): account for PRODUCT_SHIPPING_API_LEVEL when determining
# Treble. Change the behavior once the bug is fixed. # fake treble status once emulator is no longer fake treble.
ifndef PRODUCT_SHIPPING_API_LEVEL #ifdef PRODUCT_SHIPPING_API_LEVEL
$(treble_sepolicy_tests_$(version)): PRIVATE_FAKE_TREBLE := --fake-treble
else
# These requirements were originally added in Android Oreo. Devices # These requirements were originally added in Android Oreo. Devices
# launching after this should not distinguish between # launching after this should not distinguish between
# PRODUCT_FULL_TREBLE and PRODUCT_FULL_TREBLE_OVERRIDE since this could # PRODUCT_FULL_TREBLE and PRODUCT_FULL_TREBLE_OVERRIDE since this could
# lead to release problems where they think they pass this test but # lead to release problems where they think they pass this test but
# fail it when it actually gets runned for compliance. # fail it when it actually gets runned for compliance.
ifeq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),) #ifeq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),)
$(treble_sepolicy_tests_$(version)): PRIVATE_FAKE_TREBLE := --fake-treble $(treble_sepolicy_tests_$(version)): PRIVATE_FAKE_TREBLE := --fake-treble
endif # if PRODUCT_SHIPPING_API_LEVEL < 26 (Android Oreo) #endif # if PRODUCT_SHIPPING_API_LEVEL < 26 (Android Oreo)
endif # PRODUCT_SHIPPING_API_LEVEL defined #endif # PRODUCT_SHIPPING_API_LEVEL defined
endif # PRODUCT_FULL_TREBLE_OVERRIDE = true endif # PRODUCT_FULL_TREBLE_OVERRIDE = true
$(treble_sepolicy_tests_$(version)): $(HOST_OUT_EXECUTABLES)/treble_sepolicy_tests \ $(treble_sepolicy_tests_$(version)): $(HOST_OUT_EXECUTABLES)/treble_sepolicy_tests \
$(all_fc_files) $(built_sepolicy) $(built_plat_sepolicy) \ $(all_fc_files) $(built_sepolicy) $(built_plat_sepolicy) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment