Enable PRODUCT_SET_DEBUGFS_RESTRICTIONS on userdebug builds
Bug: 186500818
Change-Id: Ic8534da52b093fc3278abd2f243a506d87196b1e
Signed-off-by: Aaron Ding <aaronding@google.com>
diff --git a/device.mk b/device.mk
index 2ae775a..5eac8c8 100644
--- a/device.mk
+++ b/device.mk
@@ -215,8 +215,10 @@
# This will be updated to 31 (Android S) for shipping
PRODUCT_SHIPPING_API_LEVEL := 30
-# Temporarily disable the debugfs restriction on 31 (Android S)
-PRODUCT_SET_DEBUGFS_RESTRICTIONS := false
+# Enable the debugfs restriction before upgrading shipping abi level to 31 (Android S)
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_SET_DEBUGFS_RESTRICTIONS := true
+endif
# Enforce the Product interface
PRODUCT_PRODUCT_VNDK_VERSION := current