Android M CDD - 运行时权限要求

标签 android android-6.0-marshmallow android-compatibility

谁能帮我理解以下 CDD 要求:

MUST NOT grant any runtime permissions to preinstalled apps unless:

  1. the user's consent can be obtained before the application uses it
  2. the runtime permissions are associated with an intent pattern for which the preinstalled application is set as the default handler

我有两个问题:

  1. 预安装的应用程序安装在 /system/app/system/priv-app 文件夹中。据我所知,属于这两个文件夹的 APK 会自动获得他们在 list 中声明的​​所有权限。如果我错了,请纠正我。但是在 M 中,他们是否试图说即使应用程序是预安装的系统应用程序,也应该在应用程序被授予此权限之前在运行时提示用户。

  2. 什么是“Intent 模式”?是不是和Dialer app有权限可以打电话一样?

最佳答案

答案可能有点晚了,但您的两个假设都是正确的。

安装在 /system/app/system/priv-app 下的预装应用将被授予它们在 AndroidManifest.xml 文件中声明的所有权限。但对于搭载 Android 6.0 Marshmallow 的设备,Google 想要两件事:

  1. 预装应用应以 Android 6.0(API 级别 23)为目标平台。
  2. 他们应该请求 dangerous permissions 的运行时权限正如非系统应用程序应该做的那样。

这些是预安装应用CDD/CTS 兼容所必需的。

上述情况的唯一异常(exception)是用户将该应用程序设置为特定操作的默认应用程序(意向模式的默认处理程序):

the runtime permissions are associated with an intent pattern for which the preinstalled application is set as the default handler

例如,如果您将 Google 日历设置为日历事件的默认处理程序,则表示您授予它访问您的日历的权限。

关于Android M CDD - 运行时权限要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33379821/

相关文章:

java - 带有抽屉导航的 MapFragment

android - Nexus 10 的兼容性问题

java - Android 应用程序未在 KitKat 中运行

Android 通过点击 ActionBar 按钮触发自定义辅助功能事件

java - 无法调用不同模块中的类(动态功能模块)

android - "developer options not available for this user"棉花糖

Android 棉花糖 WifiManager 泄漏 IntentReceiver

android - 我的应用程序使用手机作为服务器,我应该如何处理打瞌睡模式?

android - 使用带有最新支持库的 admob 15.0.0 时发生 Gradle 冲突

javascript - 如何从 Youtube 播放 MP4 视频?