以屏蔽系统的FEATURE_PRINTING功能为例,可以通过如下修改,使得系统对app屏蔽了打印机功能
1、frameworks/base/core/java/com/android/server/SystemConfig.java
加载完所有的xml文件后,将FEATURE_PRINTING特性去除
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -403,6 +403,8 @@ public class SystemConfig {
Environment.getProductServicesDirectory(), "etc", "sysconfig"), ALLOW_ALL);
readPermissions(Environment.buildPath(
Environment.getProductServicesDirectory(), "etc", "permissions"), ALLOW_ALL);
+
+ removeFeature(PackageManager.FEATURE_PRINTING);
}
2、在配置文件device/sprd/board/common/handheld_core_hardware.xml 去除将FEATURE_PRINTING特性去除
去除