谁能帮我理解以下 CDD 要求:
MUST NOT grant any runtime permissions to preinstalled apps unless:
- the user's consent can be obtained before the application uses it
- the runtime permissions are associated with an intent pattern for which the preinstalled application is set as the default handler
我有两个问题:
预安装的应用程序安装在 /system/app 或 /system/priv-app 文件夹中。据我所知,属于这两个文件夹的 APK 会自动获得他们在 list 中声明的所有权限。如果我错了,请纠正我。但是在 M 中,他们是否试图说即使应用程序是预安装的系统应用程序,也应该在应用程序被授予此权限之前在运行时提示用户。
什么是“Intent 模式”?是不是和Dialer app有权限可以打电话一样?
最佳答案
答案可能有点晚了,但您的两个假设都是正确的。
安装在 /system/app 或 /system/priv-app 下的预装应用将被授予它们在 AndroidManifest.xml 文件中声明的所有权限。但对于搭载 Android 6.0 Marshmallow 的设备,Google 想要两件事:
- 预装应用应以 Android 6.0(API 级别 23)为目标平台。
- 他们应该请求 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/