summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-02-19 16:15:01 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-02-19 16:15:01 +0000
commitb4358fdfd5777325afc6c7987bf00d6e705a33f5 (patch)
treeccea011e71fc4851c49781ba951ff2723b847c42
parentceba44649f9a3c500207d25bc02d5fd226789d6f (diff)
parent24d103b16af46f7a2b94b5777fe87f2871958d30 (diff)
Merge "Add READ_CONTACTS permission to NoManSerTest shell"
-rwxr-xr-xservices/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index 604fcd38fc44..ccce0436ea59 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -359,8 +359,12 @@ public class NotificationManagerServiceTest extends UiServiceTestCase {
@Before
public void setUp() throws Exception {
+ // Shell permisssions will override permissions of our app, so add all necessary permissions
+ // fo this test here:
InstrumentationRegistry.getInstrumentation().getUiAutomation().adoptShellPermissionIdentity(
- "android.permission.WRITE_DEVICE_CONFIG", "android.permission.READ_DEVICE_CONFIG");
+ "android.permission.WRITE_DEVICE_CONFIG",
+ "android.permission.READ_DEVICE_CONFIG",
+ "android.permission.READ_CONTACTS");
MockitoAnnotations.initMocks(this);