From 5a5c7d58df31d29c30d081ca4dc5c38468239de3 Mon Sep 17 00:00:00 2001 From: Hridya Valsaraju Date: Fri, 2 Apr 2021 16:45:24 -0700 Subject: [PATCH] Add a variable that indicates build-time debugfs restrictions This patch adds a variable to indicate to check if the target has the flag PRODUCT_SET_DEBUGFS_RESTRICTIONS enabled. Bug: 184381659 Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS set Change-Id: Ic14a3759b155ed4e16048d62fcd990f4ba7c906a --- android/config.go | 4 ++++ android/variable.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/android/config.go b/android/config.go index cfbc37fe3..80651bbdf 100644 --- a/android/config.go +++ b/android/config.go @@ -1498,6 +1498,10 @@ func (c *deviceConfig) BuildBrokenTrebleSyspropNeverallow() bool { return c.config.productVariables.BuildBrokenTrebleSyspropNeverallow } +func (c *deviceConfig) BuildDebugfsRestrictionsEnabled() bool { + return c.config.productVariables.BuildDebugfsRestrictionsEnabled +} + func (c *deviceConfig) BuildBrokenVendorPropertyNamespace() bool { return c.config.productVariables.BuildBrokenVendorPropertyNamespace } diff --git a/android/variable.go b/android/variable.go index dff48c289..f25143d25 100644 --- a/android/variable.go +++ b/android/variable.go @@ -385,6 +385,8 @@ type productVariables struct { BuildBrokenTrebleSyspropNeverallow bool `json:",omitempty"` BuildBrokenVendorPropertyNamespace bool `json:",omitempty"` + BuildDebugfsRestrictionsEnabled bool `json:",omitempty"` + RequiresInsecureExecmemForSwiftshader bool `json:",omitempty"` SelinuxIgnoreNeverallows bool `json:",omitempty"`