Define new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission

Defines a new ACCESS_RCS_USER_CAPABILITY_EXCHANGE permission and
integrate it into role manager to be granted to system apps
holding the SMS, Dialer, and (newly defined) contacts role.

Adds permissions to new shell role for CTS testing.

Bug: 174861641
Bug: 154764486
Test: set TestRcsApp as each role and ensure the permission is granted
Change-Id: I863f2e6e1afffce5e8ea103790cf368c59734029
This commit is contained in:
Brad Ebinger
2021-02-16 03:51:57 +00:00
parent 36c202530e
commit 215c5e9115
5 changed files with 26 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ package android {
field public static final String ACCESS_MTP = "android.permission.ACCESS_MTP"; field public static final String ACCESS_MTP = "android.permission.ACCESS_MTP";
field public static final String ACCESS_NETWORK_CONDITIONS = "android.permission.ACCESS_NETWORK_CONDITIONS"; field public static final String ACCESS_NETWORK_CONDITIONS = "android.permission.ACCESS_NETWORK_CONDITIONS";
field public static final String ACCESS_NOTIFICATIONS = "android.permission.ACCESS_NOTIFICATIONS"; field public static final String ACCESS_NOTIFICATIONS = "android.permission.ACCESS_NOTIFICATIONS";
field public static final String ACCESS_RCS_USER_CAPABILITY_EXCHANGE = "android.permission.ACCESS_RCS_USER_CAPABILITY_EXCHANGE";
field public static final String ACCESS_SHARED_LIBRARIES = "android.permission.ACCESS_SHARED_LIBRARIES"; field public static final String ACCESS_SHARED_LIBRARIES = "android.permission.ACCESS_SHARED_LIBRARIES";
field public static final String ACCESS_SHORTCUTS = "android.permission.ACCESS_SHORTCUTS"; field public static final String ACCESS_SHORTCUTS = "android.permission.ACCESS_SHORTCUTS";
field public static final String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER"; field public static final String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER";
@@ -343,6 +344,7 @@ package android {
field public static final int config_helpPackageNameValue = 17039388; // 0x104001c field public static final int config_helpPackageNameValue = 17039388; // 0x104001c
field public static final int config_systemAutomotiveCluster = 17039400; // 0x1040028 field public static final int config_systemAutomotiveCluster = 17039400; // 0x1040028
field public static final int config_systemAutomotiveProjection = 17039401; // 0x1040029 field public static final int config_systemAutomotiveProjection = 17039401; // 0x1040029
field public static final int config_systemContacts = 17039403; // 0x104002b
field public static final int config_systemGallery = 17039399; // 0x1040027 field public static final int config_systemGallery = 17039399; // 0x1040027
field public static final int config_systemShell = 17039402; // 0x104002a field public static final int config_systemShell = 17039402; // 0x104002a
} }

View File

@@ -1313,11 +1313,13 @@
android:protectionLevel="dangerous|instant" /> android:protectionLevel="dangerous|instant" />
<!-- ====================================================================== --> <!-- ====================================================================== -->
<!-- Permissions for accessing the UCE Service --> <!-- Permissions for accessing the vendor UCE Service -->
<!-- ====================================================================== --> <!-- ====================================================================== -->
<!-- @hide Allows an application to Access UCE-Presence. <!-- @hide Allows an application to Access UCE-Presence.
<p>Protection level: signature|privileged <p>Protection level: signature|privileged
@deprecated Framework should no longer use this permission to access the vendor UCE service
using AIDL, it is instead implemented by RcsCapabilityExchangeImplBase
--> -->
<permission android:name="android.permission.ACCESS_UCE_PRESENCE_SERVICE" <permission android:name="android.permission.ACCESS_UCE_PRESENCE_SERVICE"
android:permissionGroup="android.permission-group.PHONE" android:permissionGroup="android.permission-group.PHONE"
@@ -1325,6 +1327,8 @@
<!-- @hide Allows an application to Access UCE-OPTIONS. <!-- @hide Allows an application to Access UCE-OPTIONS.
<p>Protection level: signature|privileged <p>Protection level: signature|privileged
@deprecated Framework should no longer use this permission to access the vendor UCE service
using AIDL, it is instead implemented by RcsCapabilityExchangeImplBase
--> -->
<permission android:name="android.permission.ACCESS_UCE_OPTIONS_SERVICE" <permission android:name="android.permission.ACCESS_UCE_OPTIONS_SERVICE"
android:permissionGroup="android.permission-group.PHONE" android:permissionGroup="android.permission-group.PHONE"
@@ -2448,6 +2452,15 @@
<permission android:name="android.permission.BIND_GBA_SERVICE" <permission android:name="android.permission.BIND_GBA_SERVICE"
android:protectionLevel="signature" /> android:protectionLevel="signature" />
<!-- Required for an Application to access APIs related to RCS User Capability Exchange.
<p> This permission is only granted to system applications fulfilling the SMS, Dialer, and
Contacts app roles.
<p>Protection level: internal|role
@SystemApi
@hide -->
<permission android:name="android.permission.ACCESS_RCS_USER_CAPABILITY_EXCHANGE"
android:protectionLevel="internal|role" />
<!-- ================================== --> <!-- ================================== -->
<!-- Permissions for sdcard interaction --> <!-- Permissions for sdcard interaction -->
<!-- ================================== --> <!-- ================================== -->

View File

@@ -1948,6 +1948,8 @@
<string name="config_systemAutomotiveCluster" translatable="false"></string> <string name="config_systemAutomotiveCluster" translatable="false"></string>
<!-- The name of the package that will hold the system shell role. --> <!-- The name of the package that will hold the system shell role. -->
<string name="config_systemShell" translatable="false">com.android.shell</string> <string name="config_systemShell" translatable="false">com.android.shell</string>
<!-- The name of the package that will hold the system contacts role. -->
<string name="config_systemContacts" translatable="false">com.android.contacts</string>
<!-- The name of the package that will be allowed to change its components' label/icon. --> <!-- The name of the package that will be allowed to change its components' label/icon. -->
<string name="config_overrideComponentUiPackage" translatable="false"></string> <string name="config_overrideComponentUiPackage" translatable="false"></string>

View File

@@ -3134,6 +3134,8 @@
<public name="config_systemAutomotiveProjection" /> <public name="config_systemAutomotiveProjection" />
<!-- @hide @SystemApi --> <!-- @hide @SystemApi -->
<public name="config_systemShell" /> <public name="config_systemShell" />
<!-- @hide @SystemApi -->
<public name="config_systemContacts" />
</public-group> </public-group>
<public-group type="id" first-id="0x01020055"> <public-group type="id" first-id="0x01020055">

View File

@@ -345,6 +345,12 @@
<!-- Permissions required for CTS test - AdbManagerTest --> <!-- Permissions required for CTS test - AdbManagerTest -->
<uses-permission android:name="android.permission.MANAGE_DEBUGGING" /> <uses-permission android:name="android.permission.MANAGE_DEBUGGING" />
<!-- Permission required for CTS test - CtsTelephonyTestCases -->
<uses-permission android:name="android.permission.ACCESS_RCS_USER_CAPABILITY_EXCHANGE" />
<!-- Permission required for CTS test - CtsTelephonyTestCases -->
<uses-permission android:name="android.permission.PERFORM_IMS_SINGLE_REGISTRATION" />
<!-- Permission needed for CTS test - DisplayTest --> <!-- Permission needed for CTS test - DisplayTest -->
<uses-permission android:name="android.permission.OVERRIDE_DISPLAY_MODE_REQUESTS" /> <uses-permission android:name="android.permission.OVERRIDE_DISPLAY_MODE_REQUESTS" />