summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKholoud Mohamed <kholoudm@google.com>2021-01-28 15:07:18 +0000
committerkholoud mohamed <kholoudm@google.com>2021-02-04 23:03:52 +0000
commit19b39a8fc320fdbc95f88a7382fc6c4b7fb09be2 (patch)
tree222f4f6960a535412337a17a813dcf9cf10052ec
parent5f36d6f70a5cfeb598647757f9a16c6e6b50daa5 (diff)
Grant shell QUERY_USERS and MODIFY_QUIET_MODE
Added a new permission QUERY_USERS, granted the new permission and MODIFY_USERS to shell. These permissions are required to enable CTS tests to access the following APIs: * UserManager#getUsers and any other API that depend on it * UserManager#getProfileParent * UserManager#requestQuietModeEnabled Test: Confirmed that a CTS test can call these APIs Bug: 178695365 Merged-In: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a Change-Id: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a
-rw-r--r--core/api/test-current.txt1
-rw-r--r--core/res/AndroidManifest.xml4
-rw-r--r--data/etc/privapp-permissions-platform.xml1
-rw-r--r--packages/Shell/AndroidManifest.xml2
4 files changed, 8 insertions, 0 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 546e72b8f834..668b5883cbfb 100644
--- a/core/api/test-current.txt
+++ b/core/api/test-current.txt
@@ -18,6 +18,7 @@ package android {
field public static final String NETWORK_SETTINGS = "android.permission.NETWORK_SETTINGS";
field public static final String NETWORK_STACK = "android.permission.NETWORK_STACK";
field public static final String OVERRIDE_DISPLAY_MODE_REQUESTS = "android.permission.OVERRIDE_DISPLAY_MODE_REQUESTS";
+ field public static final String QUERY_USERS = "android.permission.QUERY_USERS";
field public static final String READ_CELL_BROADCASTS = "android.permission.READ_CELL_BROADCASTS";
field public static final String READ_PRIVILEGED_PHONE_STATE = "android.permission.READ_PRIVILEGED_PHONE_STATE";
field public static final String REMOVE_TASKS = "android.permission.REMOVE_TASKS";
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 0e80c7b19224..af6b97318103 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2499,6 +2499,10 @@
<permission android:name="android.permission.CREATE_USERS"
android:protectionLevel="signature" />
+ <!-- @TestApi @hide Allows an application to query user info for all users on the device. -->
+ <permission android:name="android.permission.QUERY_USERS"
+ android:protectionLevel="signature" />
+
<!-- @hide Allows an application to set the profile owners and the device owner.
This permission is not available to third party applications.-->
<permission android:name="android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS"
diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml
index a664ee3a6d19..e6ab5c4aaf98 100644
--- a/data/etc/privapp-permissions-platform.xml
+++ b/data/etc/privapp-permissions-platform.xml
@@ -446,6 +446,7 @@ applications that come with the platform
<!-- Permission required for GTS test - GtsAssistIntentTestCases -->
<permission name="android.permission.MANAGE_SOUND_TRIGGER" />
<permission name="android.permission.CAPTURE_AUDIO_HOTWORD" />
+ <permission name="android.permission.MODIFY_QUIET_MODE" />
</privapp-permissions>
<privapp-permissions package="com.android.statementservice">
diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml
index 135356c864ec..39be9cbff40d 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -121,6 +121,8 @@
<uses-permission android:name="android.permission.CREATE_USERS" />
<uses-permission android:name="android.permission.MANAGE_DEVICE_ADMINS" />
<uses-permission android:name="android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS" />
+ <uses-permission android:name="android.permission.QUERY_USERS" />
+ <uses-permission android:name="android.permission.MODIFY_QUIET_MODE" />
<uses-permission android:name="android.permission.ACCESS_LOWPAN_STATE"/>
<uses-permission android:name="android.permission.CHANGE_LOWPAN_STATE"/>
<uses-permission android:name="android.permission.READ_LOWPAN_CREDENTIAL"/>