Home
last modified time | relevance | path

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

12

/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DNearbyDevicesPermissionTest.java23 import static android.permission.cts.PermissionUtils.grantPermission;
123 grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION); in testRequestBluetoothPermission30_GrantLocation()
124 grantPermission(TEST_APP_PKG, ACCESS_BACKGROUND_LOCATION); in testRequestBluetoothPermission30_GrantLocation()
141 grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT); in testRequestBluetoothPermission31_GrantNearby()
142 grantPermission(TEST_APP_PKG, BLUETOOTH_SCAN); in testRequestBluetoothPermission31_GrantNearby()
150 grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION); in testRequestBluetoothPermission31_GrantLocation()
151 grantPermission(TEST_APP_PKG, ACCESS_BACKGROUND_LOCATION); in testRequestBluetoothPermission31_GrantLocation()
161 grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT); in testRequestBluetoothPermission31_GrantNearby_GrantLocation()
162 grantPermission(TEST_APP_PKG, BLUETOOTH_SCAN); in testRequestBluetoothPermission31_GrantNearby_GrantLocation()
163 grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION); in testRequestBluetoothPermission31_GrantNearby_GrantLocation()
[all …]
DSplitPermissionTest.java29 import static android.permission.cts.PermissionUtils.grantPermission;
274 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in inheritGrantedPermissionState()
290 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in inheritGrantedPermissionStateSharedUidApp()
401 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in grantNewSplitPermissionState()
402 grantPermission(APP_PKG, ACCESS_BACKGROUND_LOCATION); in grantNewSplitPermissionState()
421 grantPermission(APP_PKG, READ_CALL_LOG); in grantNewSplitPermissionStatePreM()
434 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in revokeNewSplitPermissionState()
435 grantPermission(APP_PKG, ACCESS_BACKGROUND_LOCATION); in revokeNewSplitPermissionState()
465 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in newPermissionGetRevokedOnUpgrade()
466 grantPermission(APP_PKG, ACCESS_BACKGROUND_LOCATION); in newPermissionGetRevokedOnUpgrade()
[all …]
DSharedUidPermissionsTest.java21 import static android.permission.cts.PermissionUtils.grantPermission;
68 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in packageGainsRuntimePermissionsWhenJoiningSharedUid()
88 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in grantingRuntimePermissionAffectsAllPackageInSharedUid()
98 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in revokingRuntimePermissionAffectsAllPackageInSharedUid()
110 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in runtimePermissionsCanBeRevokedOnPackageThatDoesNotDeclarePermission()
123 grantPermission(PKG_THAT_REQUESTS_NO_PERMISSIONS, READ_CONTACTS); in runtimePermissionsCanBeGrantedOnPackageThatDoesNotDeclarePermission()
134 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in sharedUidLoosesRuntimePermissionWhenLastAppDeclaringItGetsUninstalled()
DRevokeSelfPermissionTest.java30 import static android.permission.cts.PermissionUtils.grantPermission;
128 grantPermission(APP_PKG_NAME, permission); in testMultiplePermissions()
161 grantPermission(APP_PKG_NAME, ACCESS_FINE_LOCATION); in testKillTriggersRevocation()
174 grantPermission(APP_PKG_NAME, ACCESS_FINE_LOCATION); in testNoRevocationWhileForeground()
195 grantPermission(APP_PKG_NAME, ACCESS_COARSE_LOCATION); in testRevokeLocationPermission()
197 grantPermission(APP_PKG_NAME, ACCESS_FINE_LOCATION); in testRevokeLocationPermission()
199 grantPermission(APP_PKG_NAME, ACCESS_BACKGROUND_LOCATION); in testRevokeLocationPermission()
209 grantPermission(APP_PKG_NAME, ACCESS_BACKGROUND_LOCATION); in testRevokeLocationPermission()
234 grantPermission(APP_PKG_NAME, ACCESS_FINE_LOCATION); in testNoRepromptWhenUserFixed()
DRemovePermissionTest.java153 private void grantPermission(String pkg, String permission) { in grantPermission() method in RemovePermissionTest
164 grantPermission(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION); in runtimePermissionShouldBeRevokedIfRemoved()
179 grantPermission(RUNTIME_PERMISSION_USER_PKG_NAME, TEST_RUNTIME_PERMISSION); in runtimePermissionShouldRemainGrantedAfterAppUpdate()
193 grantPermission(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION); in runtimePermissionDependencyTest()
200 grantPermission(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION); in runtimePermissionDependencyTest()
DPermissionControllerTest.java34 import static android.permission.cts.PermissionUtils.grantPermission;
409 PermissionUtils.grantPermission(APP2, BODY_SENSORS); in getAppPermissionsForCustomApp()
410 PermissionUtils.grantPermission(APP2, READ_CONTACTS); in getAppPermissionsForCustomApp()
411 PermissionUtils.grantPermission(APP2, WRITE_CALENDAR); in getAppPermissionsForCustomApp()
432 grantPermission(APP2, READ_CALENDAR); in revokePermissionAutomaticallyExtendsToWholeGroup()
433 grantPermission(APP2, WRITE_CALENDAR); in revokePermissionAutomaticallyExtendsToWholeGroup()
DBackgroundPermissionsTest.java28 import static android.permission.cts.PermissionUtils.grantPermission;
129 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in appOpGetsDowngradedWhenBgPermIsNotRequestedAnymore()
/packages/modules/Permission/tests/cts/permissionui/src/android/permissionui/cts/
DNotificationPermissionTest.kt263 val grantPermission = Intent(PackageManager.ACTION_REQUEST_PERMISSIONS_FOR_OTHER) in nonSystemServerPackageCannotShowPromptForOtherPackage() constant
264 grantPermission.putExtra(Intent.EXTRA_PACKAGE_NAME, APP_PACKAGE_NAME) in nonSystemServerPackageCannotShowPromptForOtherPackage()
265 grantPermission.putExtra( in nonSystemServerPackageCannotShowPromptForOtherPackage()
269 grantPermission.setPackage(context.packageManager.permissionControllerPackageName) in nonSystemServerPackageCannotShowPromptForOtherPackage()
270 grantPermission.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) in nonSystemServerPackageCannotShowPromptForOtherPackage()
271 context.startActivity(grantPermission) in nonSystemServerPackageCannotShowPromptForOtherPackage()
/packages/modules/Permission/PermissionController/tests/permissionui/src/com/android/permissioncontroller/permissionui/ui/handheld/
DManageCustomPermissionsFragmentTest.kt20 import android.permission.cts.PermissionUtils.grantPermission
73 grantPermission(USER_PKG, PERM) in groupSummaryGetsUpdatedWhenPermissionGetsGranted()
88 grantPermission(USER_PKG, PERM) in groupSummaryGetsUpdatedWhenPermissionGetsRevoked()
DManageStandardPermissionsFragmentTest.kt22 import android.permission.cts.PermissionUtils.grantPermission
153 grantPermission(LOCATION_USER_PKG, ACCESS_COARSE_LOCATION) in groupSummaryGetsUpdatedWhenPermissionGetsGranted()
165 grantPermission(LOCATION_USER_PKG, ACCESS_COARSE_LOCATION) in groupSummaryGetsUpdatedWhenPermissionGetsRevoked()
/packages/modules/Permission/PermissionController/tests/permissionui/src/com/android/permissioncontroller/permissionui/ui/
DTestAppUtils.kt19 import android.permission.cts.PermissionUtils.grantPermission
73 fun grantTestAppPermission(permission: String) = grantPermission(PERM_USER_PACKAGE, permission)
/packages/modules/HealthFitness/tests/integrationtests/src/android/healthconnect/tests/backuprestore/
DBackupRestoreE2ETest.java20 import static android.healthconnect.cts.utils.PermissionHelper.grantPermission;
225 grantPermission(TEST_APP_1_PACKAGE_NAME, TEST_APP_DECLARED_PERMISSION); in testPermissionRestoredBeforeHCRestore_expectGrantTimeIsRestoredCorrectly()
243 grantPermission(TEST_APP_1_PACKAGE_NAME, TEST_APP_DECLARED_PERMISSION); in testPermissionRestoredBeforeHCRestore_expectGrantTimeIsRestoredCorrectly()
244 grantPermission(TEST_APP_2_PACKAGE_NAME, TEST_APP_DECLARED_PERMISSION); in testPermissionRestoredBeforeHCRestore_expectGrantTimeIsRestoredCorrectly()
280 grantPermission(TEST_APP_1_PACKAGE_NAME, TEST_APP_DECLARED_PERMISSION); in testPermissionsRestoredAfterHCRestore_expectGrantTimeIsRestoredCorrectly()
306 grantPermission(TEST_APP_1_PACKAGE_NAME, TEST_APP_DECLARED_PERMISSION); in testPermissionsRestoredAfterHCRestore_expectGrantTimeIsRestoredCorrectly()
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/device/src/android/healthconnect/cts/device/
DHealthConnectDeviceTest.java36 import static android.healthconnect.cts.utils.PermissionHelper.grantPermission;
179 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), APP_A_DECLARED_PERMISSION); in setUp()
186 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), APP_A_DECLARED_PERMISSION); in tearDown()
705 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), perm); in testGrantingCorrectPermsPutsTheAppInPriorityList()
731 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), perm); in testRevokingOnlyOneCorrectPermissionDoesntRemoveAppFromPriorityList()
756 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), healthPerms.get(0)); in testRevokingOnlyOneCorrectPermissionDoesntRemoveAppFromPriorityList()
770 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), perm); in testRevokingAllCorrectPermissionsRemovesAppFromPriorityList()
799 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), perm); in testRevokingAllCorrectPermissionsRemovesAppFromPriorityList()
805 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), APP_A_DECLARED_PERMISSION); in testSelfRevokePermissions_revokedOnKill()
834 grantPermission(APP_A_WITH_READ_WRITE_PERMS.getPackageName(), perm); in testAppWithManageHealthDataPermissionCanUpdatePriority()
[all …]
/packages/modules/Permission/PermissionController/tests/permissionui/src/com/android/permissioncontroller/permissionui/ui/handheld/v31/
DPermissionUsageFragmentTest.kt22 import android.permission.cts.PermissionUtils.grantPermission
52 grantPermission(APP, CAMERA) in setup()
/packages/modules/Virtualization/service_vm/test_apk/src/java/com/android/virt/vm_attestation/testapp/
DVmAttestationTests.java60 grantPermission(VirtualMachine.MANAGE_VIRTUAL_MACHINE_PERMISSION); in setup()
61 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in setup()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DPermissionHelper.java108 public static void grantPermission(String pkgName, String permission) { in grantPermission() method in PermissionHelper
121 grantPermission(pkgName, permission); in grantPermissions()
170 grantPermission(packageName, perm); in revokeAndThenGrantHealthPermissions()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/ui/
DExerciseRouteRequestTest.kt36 import android.healthconnect.cts.utils.PermissionHelper.grantPermission
222 grantPermission(ROUTE_READER_WRITER_APP.getPackageName(), READ_EXERCISE_ROUTES) in requestRoute_ownSession_writeRouteDenied_readRoutesGranted_returnsRoute()
245 grantPermission(ROUTE_READER_WRITER_APP.getPackageName(), READ_EXERCISE_ROUTES) in requestRoute_readRoutesGranted_doesNotShowDialog_returnsRoute()
329 grantPermission(ROUTE_READER_WRITER_APP.getPackageName(), READ_EXERCISE_ROUTES) in requestRoute_readExercisePermissionRevoked_throwsSecurityException()
/packages/modules/Virtualization/tests/testapk/src/java/com/android/microdroid/test/
DMicrodroidTests.java155 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in setup()
1015 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in extraApk()
1041 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in extraApkInVmConfig()
1240 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in instancesOfSameVmHaveDifferentCdis()
1266 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in sameInstanceKeepsSameCdis()
1286 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in bccIsSuperficiallyWellFormed()
1436 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in bootFailsWhenConfigIsInvalid()
1561 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in importedVmAndOriginalVmHaveTheSameCdi()
2337 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in buildVmConfigWithNetworkSupported()
2386 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in buildVmConfigWithVendor()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/permissions/app/
DAppPermissionViewModel.kt208 grantPermission(packageName, dataTypePermission) in <lambda>()
224 private fun grantPermission(packageName: String, fitnessPermission: FitnessPermission) { in <lambda>() method
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DUsbUtil.java50 manager.grantPermission(device); in openConnection()
/packages/modules/Virtualization/service_vm/test_apk/src/java/com/android/virt/rkpd/vm_attestation/testapp/
DRkpdVmAttestationTest.java102 grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION); in setUp()
/packages/modules/HealthFitness/tests/cts/src/android/healthconnect/cts/nopermission/
DHealthConnectManagerNoPermissionsGrantedTest.java40 import static android.healthconnect.cts.utils.PermissionHelper.grantPermission;
198 grantPermission(packageName, permission); in testGetChangeLogs_noPermissions_expectError()
/packages/services/Telephony/tests/src/com/android/
DTestContext.java261 public void grantPermission(String permission) { in grantPermission() method in TestContext
/packages/services/Mtp/src/com/android/mtp/
DMtpManager.java89 mManager.grantPermission(rawDevice); in openDevice()
/packages/modules/Permission/tests/cts/permission/permissionTestUtilLib/src/android/permission/cts/
DPermissionUtils.java204 public static void grantPermission(@NonNull String packageName, @NonNull String permission) in grantPermission() method in PermissionUtils

12