Use ro.product.enforce_debugfs_restrictions to mount/unmount debugfs

The property is enabled with a build flag
PRODUCT_SET_DEBUGFS_RESTRICTIONS which can be set in the device.mk file.
For testing purposes, a persistant property persist.dbg.keep_debugfs_mounted
can be set to keep debugfs mounted after bugreport collection.

Test: build and boot, adb shell an bugreport
Bug: 184381659
Change-Id: I0b7458658a82a6a454004461b036e816e5a0022a
1 file changed