今天分享下android把permission分为两类,即Normal Permissions和Dangerous Permissions。
具体什么Normal Permissions,什么是Dangerous Permissions,见官方说明:
System permissions are divided into several protection levels. The two most important protection levels to know about are normal and dangerous permissions:
- Normal permissions cover areas where your app needs to access data or resources outside the app's sandbox, but where there's very little risk to the user's privacy or the operation of other apps. For example, permission to set the time zone is a normal permission. If an app declares that it needs a normal permission, the system automatically grants the permission to the app. For a full listing of the current normal permissions, see Normal permissions.
- Dangerous permissions cover areas where the app wants data or resources that involve the user's private information, or could potentially affect the user's stored data or the operation of other apps. For example, the ability to read the user's contacts is a dangerous permission. If an app declares that it needs a dangerous permission, the user has to explicitly grant the permission to the app.
Special Permissions
There are a couple of permissions that don't behave like normal and dangerous permissions. SYSTEM_ALERT_WINDOW and WRITE_SETTINGS are particularly sensitive, so most apps should not use them. If an app needs one of these permissions, it must declare the permission in the manifest, and send an intent requesting the user's authorization. The system responds to the intent by showing a detailed management screen to the user.
For details on how to request these permissions, see the SYSTEM_ALERT_WINDOW and WRITE_SETTINGS reference entries.
本文详细介绍了Android系统的权限分类,包括NormalPermissions和DangerousPermissions的区别及应用。NormalPermissions涉及风险较小的操作,系统自动授予;DangerousPermissions涉及用户隐私或可能影响其他应用的数据资源,需用户明确授权。
4247

被折叠的 条评论
为什么被折叠?



