Exported service does not require permission解决办法
来源:互联网 发布:亚信数据全球总部 编辑:程序博客网 时间:2024/06/05 15:57
日前修改AndroidManifest时出现如上的黄色警告,意思为:该服务输出不需要许可,别的程序可以调用该服务,是一个安全隐患。解决办法很简单:
<service android:name=".StartScreenLockService" >
在android:name后加上android:exported = "false",
<service android:name=".StartScreenLockService" android:exported = "false“>
android:exported 这个属性用于指示该服务是否能够被其他应用程序组件调用或跟它交互。如果设置为true,则能够被调用或交互,否则不能。设置为false时,只有同一个应用程序的组件或带有相同用户ID的应用程序才能启动或绑定该服务。
系统默认为true,这里需要将其设置成false。
0 0
- Exported service does not require permission解决办法
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- log4net.config 将日记同时写入到数据库和文件当中
- 关于android中操作sim卡联系人的相关内容
- C++和java多态的区别
- 编译器与解释器
- EVC创建DLL库及调用
- Exported service does not require permission解决办法
- 快速开发之xUtils(三)DbUtils详细介绍
- 几种backup小结
- java.lang.IllegalStateException: File has been moved - cannot be read again
- Activity 的四种启动模式
- 亚马逊VPS免费搭梯子
- Multibit源码解析学习篇之---发送比特币
- oracle 分析函数over
- 快速开发之xUtils(四)HttpUtils详细介绍