Correct location of property_contexts for TREBLE devices
This makes the build system, for TREBLE devices only, place
plat_property_contexts under /system/etc/selinux and
nonplat_property_contexts under /vendor/etc/selinux. For other devices
these files are placed under /, same as before.
Test: *_property_contexts in correct locations when
PRODUCT_FULL_TREBLE is set to true and when it is set to false.
Bug: 36002573
Change-Id: I7e30e64918bb3ee671fa8c7a2e30ed96a9cc1ad7
diff --git a/Android.mk b/Android.mk
index 46adbe9..2d904fb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -876,8 +876,12 @@
LOCAL_MODULE := plat_property_contexts
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
-# TODO: Change module path to TARGET_SYSTEM_OUT after b/27805372
+
+ifeq ($(PRODUCT_FULL_TREBLE),true)
+LOCAL_MODULE_PATH := $(TARGET_OUT)/etc/selinux
+else
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+endif
include $(BUILD_SYSTEM)/base_rules.mk
@@ -907,8 +911,12 @@
LOCAL_MODULE := nonplat_property_contexts
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
-# TODO: Change module path to TARGET_SYSTEM_OUT after b/27805372
+
+ifeq ($(PRODUCT_FULL_TREBLE),true)
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux
+else
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+endif
include $(BUILD_SYSTEM)/base_rules.mk