当前位置: 首页 > news >正文

云栖建站品牌建设内涵

云栖建站,品牌建设内涵,著名logo设计欣赏,网址大全100个使用展锐提供的代码编译出来的固件&#xff0c;不包含DeskClock等应用。 之前也遇到过这个情况&#xff0c;只是时间太久忘记了&#xff0c;在这里再次记录&#xff01; frameworks/native/data/etc/android.app.remove.xml<?xml version"1.0" encoding"ut…

使用展锐提供的代码编译出来的固件,不包含DeskClock等应用。

之前也遇到过这个情况,只是时间太久忘记了,在这里再次记录!

frameworks/native/data/etc/android.app.remove.xml<?xml version="1.0" encoding="utf-8"?><permissions><customized-restricted-app config="persist.remove.app"  value="1"><!-- <path name="Messages"/><path name="messaging"/><path name="MessagesGo"/> --><path name="FMRadio"/><path name="SprdFMRadio"/><path name="DreamFMRadioPrebuilt"/><path name="DreamSoundRecorderPrebuilt"/><path name="Email2"/><path name="GMailGo"/><path name="GMailGo_1G"/><path name="Gmail2"/><path name="Gmail2_2G"/><path name="DeskClock"/>  需要去掉<path name="SprdDeskClock"/><path name="DeskClockGoogle"/><path name="SprdCalendar"/><path name="SprdCalendarProvider"/><path name="SprdCalendarProviderPrebuilt"/><path name="Calendar"/><path name="CalendarGoogle"/></customized-restricted-app>
</permissions>

然后记录一下原因。

首先日志检索  DeskClock 发现只有这么三行,很好定位到源码。

18:11:19.933 SystemConfig              D  readCustomizedRestrictedPathsByConfig DeskClock, apkType = 0
18:11:19.934 SystemConfig              D  readCustomizedRestrictedPathsByConfig SprdDeskClock, apkType = 0
18:11:19.935 SystemConfig              D  readCustomizedRestrictedPathsByConfig DeskClockGoogle, apkType = 0
 

         从xml文件中读取权限651     private void readPermissionsFromXml(File permFile, int permissionFlag) {652         FileReader permReader = null;653         try {654             permReader = new FileReader(permFile);655         } catch (FileNotFoundException e) {656             Slog.w(TAG, "Couldn't find or open permissions file " + permFile);657             return;658         }659         Slog.i(TAG, "Reading permissions from " + permFile);660 661         final boolean lowRam = ActivityManager.isLowRamDeviceStatic();662 663         try {664             XmlPullParser parser = Xml.newPullParser();665             parser.setInput(permReader);666 667             int type;668             while ((type=parser.next()) != parser.START_TAG669                        && type != parser.END_DOCUMENT) {670                 ;671             }682             final boolean allowAll = permissionFlag == ALLOW_ALL;686             final boolean allowAppConfigs = (permissionFlag & ALLOW_APP_CONFIGS) != 0;687             final boolean allowPrivappPermissions = (permissionFlag & ALLOW_PRIVAPP_PERMISSIONS)688                     != 0;689             final boolean allowOemPermissions = (permissionFlag & ALLOW_OEM_PERMISSIONS) != 0;690             final boolean allowApiWhitelisting = (permissionFlag & ALLOW_HIDDENAPI_WHITELISTING)698             while (true) {699                 XmlUtils.nextElement(parser);700                 if (parser.getEventType() == XmlPullParser.END_DOCUMENT) {701                     break;702                 }703 704                 String name = parser.getName();705                 if (name == null) {706                     XmlUtils.skipCurrentTag(parser);707                     continue;708                 }709                 switch (name) {
...可以看出customized-restricted-app就是获取xml文件中的name
1277                     case "customized-restricted-app": {
1278                         String config = parser.getAttributeValue(null, "config");
1279                         String value = parser.getAttributeValue(null, "value");
1280                         if (TextUtils.isEmpty(config) || TextUtils.isEmpty(value)) {
1281                             Slog.w(TAG, "Tag config" + config + " or value " + value + " in "
1282                                 + permFile + " at " + parser.getPositionDescription() + " is empty");
1283                             XmlUtils.skipCurrentTag(parser);
1284                         }
1285                         List<String> restrictedPermission = Arrays.asList(config, value);
1286                         mCustomizedRestrictedPaths.put(restrictedPermission,
1287                                 readCustomizedRestrictedPathsByConfig(parser));
1288 
1289                     } break;读取限制的xml文件
1676     private HashMap<String, Integer> readCustomizedRestrictedPathsByConfig(XmlPullParser parser)
1677             throws IOException, XmlPullParserException {
1678         HashMap<String, Integer> customizedRestrictedPaths = new HashMap<String, Integer>();
1679         int packageDepth = parser.getDepth();
1680         int type;
1681         int depth = parser.getDepth();
1682         while (XmlUtils.nextElementWithin(parser, depth)) {
1683             String tagName = parser.getName();
1684             if (tagName.equals("path")) {
1685                 String name = parser.getAttributeValue(null, "name");
1686                 Integer apkType = 0;
1687                 try {
1688                     apkType = Integer.valueOf(parser.getAttributeValue(null, "type"));
1689                 } catch (NumberFormatException e) {
1690                 }日志在这里打印
1691                 Slog.d(TAG, "readCustomizedRestrictedPathsByConfig " + name +
1692                         ", apkType = " + apkType);
1693                 customizedRestrictedPaths.put(name, apkType);
1694             } else {
1695                 Slog.w(TAG, "Unknown element under <customized-restricted-app>: "
1696                       + parser.getName());
1697             }
1698         }
1699         return customizedRestrictedPaths;
1700     }

然后检索一下 customized-restricted-app

来看一下定义

device/sprd/xxx/xxx/module/app/md.mk#add for not install unused app
PRODUCT_PRODUCT_PROPERTIES += persist.remove.app=1
PRODUCT_COPY_FILES += \frameworks/native/data/etc/android.app.remove.xml:product/etc/permissions/android.app.remove.xml


 

http://www.yayakq.cn/news/370823/

相关文章:

  • 售后服务网点建设是指网站淮安市网站
  • 机械设备做公司网站做婚介网站可行性报告模板
  • 官方网站入口做网站卖东西流程
  • 17zwd一起做网站普宁动物园网站建设的可行性分析
  • 哈尔滨网站建设报价给艺术家做网站的工作
  • 网站维护是什么样app开发方式有哪些
  • 购物网站开发的背景做名片赞机器人电脑网站是多少钱
  • 用mvc做网站的缺点wordpress 4.8.5
  • 设计网站公司力荐亿企邦html代码大全很全的
  • 帝国cms做网站流程免费全部游戏大全
  • 做外贸英语要什么网站多种五屏网站建设
  • 职业技术学院网站建设项目陕西建工第三建设集团网站
  • 个人可以做视频网站吗沈阳网络seo公司
  • 云网站功能小程序开发公司主页制作标准
  • 网站首页布局设计代码长春网站制作wang
  • 如何做供求网站广告公司运作模式
  • 360网站运营福清福州网站建设
  • 专业网站开发哪里好澄迈网站新闻建设
  • 关于工装设计的网站网页版微信二维码失效怎么恢复
  • 网站运营一般做那些分析坪山附近网站建设
  • 网站建设学习内容阿里云服务器安装网站
  • 福建建设执业资格注册管理中心网站内链好的网站
  • 用户体验好的网站有了网站源码怎么做app
  • 广播电台网站建设方案网站搭建免费软件
  • 怎么做化妆品网站内容规划河南省旅游网站建设
  • 档案网站建设对比北京网页网站设计
  • 地方类门户网站创意广告图片
  • 本地的佛山网站建设wordpress根据字段判断
  • 模块建站工具株洲网站建设的公司怎么找
  • 上海网站制作建设中国芯片三巨头