Android M CDD - 运行时权限要求(Android M CDD - runtime permissions requirements)

有人可以帮我理解以下CDD要求:

绝不能为预安装的应用程序授予任何运行时权限,除非:

用户同意可以在应用程序使用之前获得 运行时权限与预先安装的应用程序设置为默认处理程序的意图模式相关联

我有两个问题:

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

什么是“意图模式”? 是否与拨号应用有权拨打电话一样?

Can someone please help me understand the following CDD requirement:

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

I have two questions:

Pre-installed apps are installed either in /system/app or /system/priv-app folder. AFAIK, APKs that fall under these two folders automatically get all permissions they claim in their manifest. Please correct me if I am wrong. But in M, are they trying to say that even if an app is a pre-installed system app, a user should be prompted at runtime before the app can be granted this permission.

What is "intent pattern"? Is it the same as the Dialer app has permission to make phone calls?

最满意答案

这可能是一种迟到的答案,但你的两个假设都是正确的。

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

预安装的应用应针对Android 6.0(API级别23)。 他们应该像非系统应用程序那样请求危险权限的运行时权限。

预安装的应用程序必须符合CDD / CTS标准

只有例外,如果用户将该应用程序设置为特定操作的默认值(意图模式的默认处理程序):

运行时权限与预先安装的应用程序设置为默认处理程序的意图模式相关联

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

It can be a kind of late for the answer but your both assumptions are correct.

Pre-installed apps that are installed under /system/app or /system/priv-app will be granted all permissions they declared in the AndroidManifest.xml file. But for devices with Android 6.0 Marshmallow, Google wants two things:

Pre-installed apps should target Android 6.0 (API level 23). They should request runtime permissions for dangerous permissions as non-system apps should do.

These are required for pre-installed apps to be CDD/CTS compliant.

Only exception to above is if the user sets that application to be the default for a specific action (default handler for an intent pattern):

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

For instance, if you set Google Calendar to be the default handler for Calendar events, you’re giving it permission to access your Calendar.

更多推荐