From 994cbf4d3905b6ce561d0198aa9fdd6ee27e5984 Mon Sep 17 00:00:00 2001
From: Jeff Vander Stoep <jeffv@google.com>
Date: Tue, 26 Sep 2017 12:25:20 -0700
Subject: [PATCH] Add userbuild() macro for user-build-only policy

Particularly useful for suppressing selinux logspam for debug-only
permissions.

Bug: 65843095
Test: build, boot, and run tests on user and userdebug builds.
Change-Id: I18ce0b2cf1e96ca037e93309dddb476a150b677f
---
 public/te_macros | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/public/te_macros b/public/te_macros
index e8c667d41..cac977b1c 100644
--- a/public/te_macros
+++ b/public/te_macros
@@ -459,6 +459,12 @@ define(`not_full_treble', ifelse(target_full_treble, `true', , $1))
 #
 define(`userdebug_or_eng', ifelse(target_build_variant, `eng', $1, ifelse(target_build_variant, `userdebug', $1)))
 
+#####################################
+# User builds
+# SELinux rules which apply only to user builds
+#
+define(`userbuild', ifelse(target_build_variant, `user', $1, ))
+
 #####################################
 # asan builds
 # SELinux rules which apply only to asan builds
-- 
GitLab