android:protectionLevel
来源:互联网 发布:物流数据交换技术 编辑:程序博客网 时间:2024/05/19 07:42
定义自己的permission的时候要写明android:protectionLevel,这个属性有四个值。分别是:
normal:
这个用于比较低风险的权限,如果一个权限的android:protectionLevel设置为normal,当某个app申请这个权限时system会自动授予app权限,而不用询问用户。
dangerous:
用于高风险的权限,例如可能访问私人数据(例如短信,联系人),或者控制设备(使用摄像头,定位)。
当某个app申请使用这个权限是system可能会询问用户是否同意。(例如KK上打开权限管理时会有dialog提示用户)
signature:
如果申请权限的app和声明权限的app有相同的证书那么系统就自动授予这个app权限,不用询问用户。
signatureOrSystem:
包含上面的signature,另外如果是system image中自带的app申请这个权限,那么system也会自动授予它权限而不需要询问用户。
当然不管是申请什么级别的权限,在安装app时都会显示出来让用户看到。
另外这些级别似乎并不兼容低级别的权限,比如一个app向同一签名的app申请normal权限可能会失败。
0 0
- android:protectionLevel
- android:protectionlevel的不同类型
- Android permission之android:protectionLevel
- Android权限级别(protectionLevel)
- android自定义permission android:protectionLevel说明
- android -————permission之android:protectionLevel
- Android中的权限管理(基于Permission ProtectionLevel)
- How to: Set the ProtectionLevel Property
- Android
- android
- Android
- android
- android
- Android
- Android
- android
- android
- android
- Java程序员面试技巧
- 2013校赛未A Min Number
- Android编程之LocalBroadcastManager源码详解
- VS2010 快捷键 (空格显示 绿点, Tab 显示箭头)
- python菜鸟学习第一课
- android:protectionLevel
- 2014之实习A计划
- 大乐透
- WCF(三)制作WCF安装包(Windows Services版)
- cocos2dx 2.0 和cocos2dx 2.2的区别
- position属性知一二
- poj3694 Network 边双联通缩点+离线LCA
- 我的vim配置和solardark主题
- VB6中双精度和单精度数据类型的比较