diff options
| author | 2020-02-19 16:15:01 +0000 | |
|---|---|---|
| committer | 2020-02-19 16:15:01 +0000 | |
| commit | b4358fdfd5777325afc6c7987bf00d6e705a33f5 (patch) | |
| tree | ccea011e71fc4851c49781ba951ff2723b847c42 | |
| parent | ceba44649f9a3c500207d25bc02d5fd226789d6f (diff) | |
| parent | 24d103b16af46f7a2b94b5777fe87f2871958d30 (diff) | |
Merge "Add READ_CONTACTS permission to NoManSerTest shell"
| -rwxr-xr-x | services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java | 6 |
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); |