From 9087b77517d76cf091e0130b44b4c7cf94625524 Mon Sep 17 00:00:00 2001
From: Tri Vo <trong@google.com>
Date: Tue, 30 Oct 2018 21:09:41 +0000
Subject: [PATCH] Reland "Default undefined PRODUCT_SHIPPING_API_LEVEL to fake
 treble"

This is a temporary measure to disable treble sepolicy tests for
non-compliant targets.

Bug: 113124961
Bug: 111243627
Change-Id: I83d6efad0ff5c7d87a4b990560c390b66aeb3653
Test: m selinux_policy
---
 treble_sepolicy_tests_for_release.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/treble_sepolicy_tests_for_release.mk b/treble_sepolicy_tests_for_release.mk
index e7c73c9b7..7b5195ec1 100644
--- a/treble_sepolicy_tests_for_release.mk
+++ b/treble_sepolicy_tests_for_release.mk
@@ -89,7 +89,11 @@ $(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_FAKE_TREBLE :=
 ifeq ($(PRODUCT_FULL_TREBLE_OVERRIDE),true)
-ifdef PRODUCT_SHIPPING_API_LEVEL
+# TODO(b/113124961): undefined PRODUCT_SHIPPING_API_LEVEL should default to full
+# Treble. Change the behavior once the bug is fixed.
+ifndef PRODUCT_SHIPPING_API_LEVEL
+$(treble_sepolicy_tests_$(version)): PRIVATE_FAKE_TREBLE := --fake-treble
+else
 # These requirements were originally added in Android Oreo. Devices
 # launching after this should not distinguish between
 # PRODUCT_FULL_TREBLE and PRODUCT_FULL_TREBLE_OVERRIDE since this could
-- 
GitLab