From c60281bd214449a7da79f4cac1f473f02ea08f25 Mon Sep 17 00:00:00 2001 From: Kholoud Mohamed Date: Thu, 28 Jan 2021 15:07:18 +0000 Subject: [PATCH] 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 Change-Id: Ifa14d24ee1873161e3986e8d0669fd47a7bcaa7a --- core/api/test-current.txt | 1 + core/res/AndroidManifest.xml | 4 ++++ data/etc/privapp-permissions-platform.xml | 1 + packages/Shell/AndroidManifest.xml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index eda88e909fa80..e88b6b92581e8 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -23,6 +23,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 5442c03555903..337f6a09c2677 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -2583,6 +2583,10 @@ + + + + diff --git a/packages/Shell/AndroidManifest.xml b/packages/Shell/AndroidManifest.xml index 1af7781dff968..eab0990bb8680 100644 --- a/packages/Shell/AndroidManifest.xml +++ b/packages/Shell/AndroidManifest.xml @@ -122,6 +122,8 @@ + +