/cts/tests/tests/security/src/android/security/cts/ |
D | PermissionBackupCertificateCheckTest.kt | 22 import android.permission.cts.PermissionUtils.grantPermission 98 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_sameCert_restoresRuntimePermissions() 122 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_diffCert_doesNotGrantRuntimePermissions() 146 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_midHistoryToRotated_restoresRuntimePermissions() 170 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_origToRotated_restoresRuntimePermissions() 194 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_rotatedToMidHistory_restoresRuntimePermissions() 218 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_rotatedToOrig_restoresRuntimePermissions() 243 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_sameWithHistory_restoresRuntimePermissions() 268 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_sameWithoutHistory_restoresRuntimePermissions() 292 grantPermission(APP, ACCESS_FINE_LOCATION) in testRestore_notInBackedUpHistory_doesNotRestoreRuntimePerms() [all …]
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/ |
D | PackageTest.java | 198 TestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_installPermission_throwsException() 205 TestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_nonDeclaredPermission_throwsException() 213 sTestApp.pkg().grantPermission(USER_SPECIFIC_PERMISSION); in grantPermission_permissionIsGranted() 226 sTestApp.pkg().grantPermission(sDeviceState.secondaryUser(), USER_SPECIFIC_PERMISSION); in grantPermission_permissionIsUserSpecific_permissionIsGrantedOnlyForThatUser() 237 TestApis.packages().find(NON_EXISTING_PACKAGE_NAME).grantPermission(sUser, in grantPermission_packageDoesNotExist_throwsException() 244 TestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_permissionDoesNotExist_throwsException() 253 () -> sTestApp.pkg().grantPermission(DECLARED_RUNTIME_PERMISSION)); in grantPermission_packageIsNotInstalledForUser_throwsException() 267 pkg.grantPermission(sUser, USER_SPECIFIC_PERMISSION); in denyPermission_ownPackage_permissionIsGranted_throwsException() 276 sTestApp.pkg().grantPermission(USER_SPECIFIC_PERMISSION); in denyPermission_permissionIsNotGranted() 308 sTestApp.pkg().grantPermission(USER_SPECIFIC_PERMISSION); in denyPermission_permissionIsUserSpecific_permissionIsDeniedOnlyForThatUser() [all …]
|
/cts/tests/tests/wifi/src/android/net/wifi/sharedconnectivity/cts/ |
D | SharedConnectivityTest.java | 163 grantPermission(); in registerCallback_withoutPermission_throwsSecurityException() 185 grantPermission(); in registerCallback_onServiceConnectedCallbackReceived() 202 grantPermission(); in unregisterCallback_beforeRegister_unregisterUnsuccessful() 217 grantPermission(); in unregisterCallback_unregisterSuccessful() 253 grantPermission(); in setHotspotNetworks_managerCallbackReceivedWithCorrectData() 283 grantPermission(); in setKnownNetworks_managerCallbackReceivedWithCorrectData() 312 grantPermission(); in setSettingsState_managerCallbackReceivedWithCorrectData() 343 grantPermission(); in updateHotspotNetworkConnectionStatus_managerCallbackReceivedWithCorrectData() 374 grantPermission(); in updateKnownNetworkConnectionStatus_managerCallbackReceivedWithCorrectData() 404 grantPermission(); in connectHotspotNetwork_serviceCallbackReceivedWithCorrectData() [all …]
|
/cts/tests/backup/src/android/backup/cts/ |
D | PermissionTest.java | 32 import static android.permission.cts.PermissionUtils.grantPermission; 101 grantPermission(APP, ACCESS_FINE_LOCATION); in testGrantDeniedRuntimePermission() 140 grantPermission(APP, WRITE_CONTACTS); in testNoTriStateRuntimePermission() 184 grantPermission(APP, ACCESS_FINE_LOCATION); in testGrantForegroundRuntimePermission() 227 grantPermission(APP, ACCESS_FINE_LOCATION); in testGrantForegroundAndBackgroundRuntimePermission() 228 grantPermission(APP, ACCESS_BACKGROUND_LOCATION); in testGrantForegroundAndBackgroundRuntimePermission() 335 grantPermission(APP, ACCESS_FINE_LOCATION); in testDelayedRestore()
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | PackageSetInstallerTest.kt | 156 grantPermission(permission) in runTest() 175 grantPermission(permission) in runTest() 186 grantPermission(permission) in runTest() 205 private fun grantPermission(permission: String) { in grantPermission() method
|
/cts/tests/tests/telephonyprovider/src/android/telephonyprovider/cts/ |
D | ApnTest.java | 291 private void insertTestApnAndValidateInsertion(boolean grantPermission) throws Exception { in insertTestApnAndValidateInsertion() argument 292 if (grantPermission) { in insertTestApnAndValidateInsertion() 315 if (grantPermission) { in insertTestApnAndValidateInsertion()
|
/cts/tests/tests/mediacujtest/common/src/android/media/cujcommon/cts/ |
D | NotificationGenerator.java | 39 PermissionUtils.grantPermission(SHORTFORM_PLAYBAK_TEST_APP, POST_NOTIFICATIONS); in createNotification()
|
/cts/tests/tests/hibernation/src/android/hibernation/cts/ |
D | AutoRevokeTest.kt | 349 grantPermission(preMinVersionAppPackageName) in <lambda>() 374 grantPermission() in <lambda>() 413 grantPermission() in <lambda>() 585 grantPermission() in <lambda>() 667 private fun grantPermission( in <lambda>() method
|
/cts/tests/tests/virtualdevice/audio/src/android/virtualdevice/cts/audio/ |
D | VirtualAudioPermissionTest.java | 155 grantPermission(mVirtualDeviceId); in audioInjection_virtualDeviceWithMicrophone_permissionGranted() 209 grantPermission(mVirtualDeviceId); in audioInjection_virtualDeviceWithManualAudioPolicy_permissionGrantedOnlyOnDefaultDevice() 275 private void grantPermission(int deviceId) { in grantPermission() method in VirtualAudioPermissionTest
|
/cts/tests/accessibility/common/src/android/accessibility/cts/common/ |
D | ShellCommandBuilder.java | 79 public ShellCommandBuilder grantPermission(String packageName, String permission) { in grantPermission() method in ShellCommandBuilder
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityManagerProcessStateTest.java | 363 PermissionUtils.grantPermission( in testUidImportanceListener() 522 PermissionUtils.grantPermission( in testBackgroundCheckService() 693 PermissionUtils.grantPermission( in testBackgroundCheckStopsService() 862 PermissionUtils.grantPermission( in testBackgroundCheckBroadcastService() 998 PermissionUtils.grantPermission( in testBackgroundCheckActivityService() 1083 PermissionUtils.grantPermission( in testForegroundServiceAppOp() 1249 PermissionUtils.grantPermission( in testBgRestrictedForegroundService() 1344 PermissionUtils.grantPermission( in testCantSaveStateLaunchAndBackground() 1493 PermissionUtils.grantPermission( in testCantSaveStateLaunchAndSwitch() 2047 PermissionUtils.grantPermission( in testCycleTop() [all …]
|
D | RequestTileServiceAddTest.kt | 225 PermissionUtils.grantPermission(packageName, permission) in withPermission()
|
D | ActivityManagerFgsDelegateTest.java | 128 PermissionUtils.grantPermission( in cleanupResiduals() 904 PermissionUtils.grantPermission( in allowBgFgsStart()
|
/cts/tests/tests/notificationlegacy/notificationlegacy28/src/android/app/notification/legacy28/cts/ |
D | NotificationManager28Test.java | 64 PermissionUtils.grantPermission(mContext.getPackageName(), POST_NOTIFICATIONS); in setUp()
|
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ |
D | ShortcutManagerThrottlingTest.java | 70 PermissionUtils.grantPermission(TARGET_PACKAGE, Manifest.permission.POST_NOTIFICATIONS); in setUp()
|
/cts/hostsidetests/scopedstorage/redacturi/src/android/scopedstorage/cts/redacturi/ |
D | RedactUriDeviceTest.java | 29 import static android.scopedstorage.cts.lib.TestUtils.grantPermission; 317 grantPermission(APP_E.getPackageName(), Manifest.permission.ACCESS_MEDIA_LOCATION); in testSharedRedactedUri_openFileForRead_withLocationPerm() 335 grantPermission(APP_E.getPackageName(), Manifest.permission.ACCESS_MEDIA_LOCATION); in testSharedRedactedUri_openFdForRead_withLocationPerm()
|
/cts/tests/tests/uidmigration/src/android/uidmigration/cts/ |
D | AppIdMigrationTest.kt | 99 PermissionUtils.grantPermission(secondaryPkg, WRITE_EXTERNAL_STORAGE) in testPermissionMigration()
|
/cts/tests/tests/notification/src/android/app/notification/current/cts/ |
D | NotificationManagerTest.java | 240 PermissionUtils.grantPermission(mContext.getPackageName(), POST_NOTIFICATIONS); in setUp() 241 PermissionUtils.grantPermission(STUB_PACKAGE_NAME, POST_NOTIFICATIONS); in setUp() 242 PermissionUtils.grantPermission(TEST_APP, POST_NOTIFICATIONS); in setUp() 243 PermissionUtils.grantPermission(TRAMPOLINE_APP, POST_NOTIFICATIONS); in setUp() 244 PermissionUtils.grantPermission(TRAMPOLINE_APP_API_30, POST_NOTIFICATIONS); in setUp() 245 PermissionUtils.grantPermission(TRAMPOLINE_APP_API_32, POST_NOTIFICATIONS); in setUp() 246 PermissionUtils.grantPermission(NOTIFICATIONPROVIDER, POST_NOTIFICATIONS); in setUp() 247 PermissionUtils.grantPermission(PRESSURE_APP_00, POST_NOTIFICATIONS); in setUp() 248 PermissionUtils.grantPermission(PRESSURE_APP_01, POST_NOTIFICATIONS); in setUp() 249 PermissionUtils.grantPermission(PRESSURE_APP_02, POST_NOTIFICATIONS); in setUp() [all …]
|
D | NotificationManagerBubbleTest.java | 100 PermissionUtils.grantPermission(STUB_PACKAGE_NAME, POST_NOTIFICATIONS); in setUp() 101 PermissionUtils.grantPermission(mContext.getPackageName(), POST_NOTIFICATIONS); in setUp()
|
/cts/tests/app/FgsTest/src/android/app/cts/fgstest/ |
D | ActivityManagerForegroundServiceTypeTest.java | 528 void grantPermission(String packageName) throws Exception; in grantPermission() method 534 public void grantPermission(String packageName) throws Exception { in grantPermission() method in ActivityManagerForegroundServiceTypeTest.DeviceAllowlistPermissionOp 612 op.grantPermission(packageName); in grantPermissions()
|
/cts/tests/tests/notificationlegacy/notificationlegacy29/src/android/app/notification/legacy29/cts/ |
D | NotificationManager29Test.java | 77 PermissionUtils.grantPermission(mContext.getPackageName(), POST_NOTIFICATIONS); in setUp()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | NotificationListenerTest.java | 74 PermissionUtils.grantPermission(SENDER_PACKAGE, POST_NOTIFICATIONS); in setUp()
|
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/ |
D | TestUtils.java | 198 public static void grantPermission(String packageName, String permission) { in grantPermission() method in TestUtils 734 public static void addressStoragePermissions(String packageName, boolean grantPermission) { in addressStoragePermissions() argument 735 if (grantPermission) { in addressStoragePermissions() 736 grantPermission(packageName, Manifest.permission.READ_EXTERNAL_STORAGE); in addressStoragePermissions() 738 grantPermission(packageName, Manifest.permission.READ_MEDIA_IMAGES); in addressStoragePermissions() 739 grantPermission(packageName, Manifest.permission.READ_MEDIA_AUDIO); in addressStoragePermissions() 740 grantPermission(packageName, Manifest.permission.READ_MEDIA_VIDEO); in addressStoragePermissions()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/ |
D | Package.java | 373 public Package grantPermission(UserReference user, String permission) { in grantPermission() method in Package 404 public Package grantPermission(String permission) { in grantPermission() method in Package 405 return grantPermission(TestApis.users().instrumented(), permission); in grantPermission()
|
/cts/tests/tests/display/src/android/display/cts/ |
D | BrightnessTest.java | 588 private void grantPermission(String permission) { in grantPermission() method 695 grantPermission(mPermission); in PermissionClosable()
|