Home
last modified time | relevance | path

Searched refs:grantPermission (Results 1 – 25 of 43) sorted by relevance

12

/cts/tests/tests/security/src/android/security/cts/
DPermissionBackupCertificateCheckTest.kt22 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/
DPackageTest.java198 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/
DSharedConnectivityTest.java163 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/
DPermissionTest.java32 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/
DPackageSetInstallerTest.kt156 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/
DApnTest.java291 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/
DNotificationGenerator.java39 PermissionUtils.grantPermission(SHORTFORM_PLAYBAK_TEST_APP, POST_NOTIFICATIONS); in createNotification()
/cts/tests/tests/hibernation/src/android/hibernation/cts/
DAutoRevokeTest.kt349 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/
DVirtualAudioPermissionTest.java155 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/
DShellCommandBuilder.java79 public ShellCommandBuilder grantPermission(String packageName, String permission) { in grantPermission() method in ShellCommandBuilder
/cts/tests/app/src/android/app/cts/
DActivityManagerProcessStateTest.java363 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 …]
DRequestTileServiceAddTest.kt225 PermissionUtils.grantPermission(packageName, permission) in withPermission()
DActivityManagerFgsDelegateTest.java128 PermissionUtils.grantPermission( in cleanupResiduals()
904 PermissionUtils.grantPermission( in allowBgFgsStart()
/cts/tests/tests/notificationlegacy/notificationlegacy28/src/android/app/notification/legacy28/cts/
DNotificationManager28Test.java64 PermissionUtils.grantPermission(mContext.getPackageName(), POST_NOTIFICATIONS); in setUp()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerThrottlingTest.java70 PermissionUtils.grantPermission(TARGET_PACKAGE, Manifest.permission.POST_NOTIFICATIONS); in setUp()
/cts/hostsidetests/scopedstorage/redacturi/src/android/scopedstorage/cts/redacturi/
DRedactUriDeviceTest.java29 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/
DAppIdMigrationTest.kt99 PermissionUtils.grantPermission(secondaryPkg, WRITE_EXTERNAL_STORAGE) in testPermissionMigration()
/cts/tests/tests/notification/src/android/app/notification/current/cts/
DNotificationManagerTest.java240 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 …]
DNotificationManagerBubbleTest.java100 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/
DActivityManagerForegroundServiceTypeTest.java528 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/
DNotificationManager29Test.java77 PermissionUtils.grantPermission(mContext.getPackageName(), POST_NOTIFICATIONS); in setUp()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DNotificationListenerTest.java74 PermissionUtils.grantPermission(SENDER_PACKAGE, POST_NOTIFICATIONS); in setUp()
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java198 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/
DPackage.java373 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/
DBrightnessTest.java588 private void grantPermission(String permission) { in grantPermission() method
695 grantPermission(mPermission); in PermissionClosable()

12