Home
last modified time | relevance | path

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

/cts/tests/tests/permission/src/android/permission/cts/
DNearbyDevicesPermissionTest.java23 import static android.permission.cts.PermissionUtils.grantPermission;
124 grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION); in testRequestBluetoothPermission30_GrantLocation()
125 grantPermission(TEST_APP_PKG, ACCESS_BACKGROUND_LOCATION); in testRequestBluetoothPermission30_GrantLocation()
140 grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT); in testRequestBluetoothPermission31_GrantNearby()
141 grantPermission(TEST_APP_PKG, BLUETOOTH_SCAN); in testRequestBluetoothPermission31_GrantNearby()
149 grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION); in testRequestBluetoothPermission31_GrantLocation()
150 grantPermission(TEST_APP_PKG, ACCESS_BACKGROUND_LOCATION); in testRequestBluetoothPermission31_GrantLocation()
158 grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT); in testRequestBluetoothPermission31_GrantNearby_GrantLocation()
159 grantPermission(TEST_APP_PKG, BLUETOOTH_SCAN); in testRequestBluetoothPermission31_GrantNearby_GrantLocation()
160 grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION); in testRequestBluetoothPermission31_GrantNearby_GrantLocation()
[all …]
DSplitPermissionTest.java29 import static android.permission.cts.PermissionUtils.grantPermission;
264 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in inheritGrantedPermissionState()
280 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in inheritGrantedPermissionStateSharedUidApp()
386 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in grantNewSplitPermissionState()
387 grantPermission(APP_PKG, ACCESS_BACKGROUND_LOCATION); in grantNewSplitPermissionState()
403 grantPermission(APP_PKG, READ_CALL_LOG); in grantNewSplitPermissionStatePreM()
416 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in revokeNewSplitPermissionState()
417 grantPermission(APP_PKG, ACCESS_BACKGROUND_LOCATION); in revokeNewSplitPermissionState()
447 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in newPermissionGetRevokedOnUpgrade()
448 grantPermission(APP_PKG, ACCESS_BACKGROUND_LOCATION); in newPermissionGetRevokedOnUpgrade()
[all …]
DSharedUidPermissionsTest.java21 import static android.permission.cts.PermissionUtils.grantPermission;
64 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in packageGainsRuntimePermissionsWhenJoiningSharedUid()
84 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in grantingRuntimePermissionAffectsAllPackageInSharedUid()
94 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in revokingRuntimePermissionAffectsAllPackageInSharedUid()
106 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in runtimePermissionsCanBeRevokedOnPackageThatDoesNotDeclarePermission()
118 grantPermission(PKG_THAT_REQUESTS_NO_PERMISSIONS, READ_CONTACTS); in runtimePermissionsCanBeGrantedOnPackageThatDoesNotDeclarePermission()
129 grantPermission(PKG_THAT_REQUESTS_PERMISSIONS, READ_CONTACTS); in sharedUidLoosesRuntimePermissionWhenLastAppDeclaringItGetsUninstalled()
DRemovePermissionTest.java148 private void grantPermission(String pkg, String permission) { in grantPermission() method in RemovePermissionTest
159 grantPermission(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION); in runtimePermissionShouldBeRevokedIfRemoved()
174 grantPermission(RUNTIME_PERMISSION_USER_PKG_NAME, TEST_RUNTIME_PERMISSION); in runtimePermissionShouldRemainGrantedAfterAppUpdate()
188 grantPermission(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION); in runtimePermissionDependencyTest()
195 grantPermission(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION); in runtimePermissionDependencyTest()
DPermissionControllerTest.java33 import static android.permission.cts.PermissionUtils.grantPermission;
405 PermissionUtils.grantPermission(APP2, BODY_SENSORS); in getAppPermissionsForCustomApp()
406 PermissionUtils.grantPermission(APP2, READ_CONTACTS); in getAppPermissionsForCustomApp()
407 PermissionUtils.grantPermission(APP2, WRITE_CALENDAR); in getAppPermissionsForCustomApp()
428 grantPermission(APP2, READ_CALENDAR); in revokePermissionAutomaticallyExtendsToWholeGroup()
429 grantPermission(APP2, WRITE_CALENDAR); in revokePermissionAutomaticallyExtendsToWholeGroup()
DBackgroundPermissionsTest.java28 import static android.permission.cts.PermissionUtils.grantPermission;
129 grantPermission(APP_PKG, ACCESS_COARSE_LOCATION); in appOpGetsDowngradedWhenBgPermIsNotRequestedAnymore()
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/
DPackageReferenceTest.java171 sTestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_installPermission_throwsException()
178 sTestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_nonDeclaredPermission_throwsException()
185 sInstrumentedPackage.grantPermission(sOtherUser, USER_SPECIFIC_PERMISSION); in grantPermission_permissionIsGranted()
202 sInstrumentedPackage.grantPermission(newUser, USER_SPECIFIC_PERMISSION); in grantPermission_permissionIsUserSpecific_permissionIsGrantedOnlyForThatUser()
217 sTestApis.packages().find(NON_EXISTING_PACKAGE_NAME).grantPermission(sUser, in grantPermission_packageDoesNotExist_throwsException()
224 sTestApis.packages().find(sContext.getPackageName()).grantPermission(sUser, in grantPermission_permissionDoesNotExist_throwsException()
233 () -> sInstrumentedPackage.grantPermission(sOtherUser, in grantPermission_packageIsNotInstalledForUser_throwsException()
248 packageReference.grantPermission(sUser, USER_SPECIFIC_PERMISSION); in denyPermission_ownPackage_permissionIsGranted_throwsException()
258 sInstrumentedPackage.grantPermission(sOtherUser, USER_SPECIFIC_PERMISSION); in denyPermission_permissionIsNotGranted()
330 sInstrumentedPackage.grantPermission(sOtherUser, USER_SPECIFIC_PERMISSION); in denyPermission_permissionIsUserSpecific_permissionIsDeniedOnlyForThatUser()
[all …]
/cts/tests/backup/src/android/backup/cts/
DPermissionTest.java32 import static android.permission.cts.PermissionUtils.grantPermission;
100 grantPermission(APP, ACCESS_FINE_LOCATION); in testGrantDeniedRuntimePermission()
139 grantPermission(APP, WRITE_CONTACTS); in testNoTriStateRuntimePermission()
183 grantPermission(APP, ACCESS_FINE_LOCATION); in testGrantForegroundRuntimePermission()
226 grantPermission(APP, ACCESS_FINE_LOCATION); in testGrantForegroundAndBackgroundRuntimePermission()
227 grantPermission(APP, ACCESS_BACKGROUND_LOCATION); in testGrantForegroundAndBackgroundRuntimePermission()
334 grantPermission(APP, ACCESS_FINE_LOCATION); in testDelayedRestore()
/cts/tests/tests/display/src/android/display/cts/
DBrightnessTest.java107 grantPermission(Manifest.permission.BRIGHTNESS_SLIDER_USAGE); in testBrightnessSliderTracking()
157 grantPermission(Manifest.permission.BRIGHTNESS_SLIDER_USAGE); in testNoTrackingForManualBrightness()
194 grantPermission(Manifest.permission.BRIGHTNESS_SLIDER_USAGE); in testNoColorSampleData()
195 grantPermission(Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS); in testNoColorSampleData()
258 grantPermission(Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS); in testSetGetSimpleCurve()
304 grantPermission(Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS); in testGetDefaultCurve()
351 grantPermission(Manifest.permission.BRIGHTNESS_SLIDER_USAGE);
352 grantPermission(Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS);
476 private void grantPermission(String permission) { in grantPermission() method in BrightnessTest
/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/app/src/android/app/cts/
DActivityManagerProcessStateTest.java320 PermissionUtils.grantPermission( in testUidImportanceListener()
479 PermissionUtils.grantPermission( in testBackgroundCheckService()
650 PermissionUtils.grantPermission( in testBackgroundCheckStopsService()
819 PermissionUtils.grantPermission( in testBackgroundCheckBroadcastService()
955 PermissionUtils.grantPermission( in testBackgroundCheckActivityService()
1040 PermissionUtils.grantPermission( in testForegroundServiceAppOp()
1206 PermissionUtils.grantPermission( in testBgRestrictedForegroundService()
1301 PermissionUtils.grantPermission( in testCantSaveStateLaunchAndBackground()
1449 PermissionUtils.grantPermission( in testCantSaveStateLaunchAndSwitch()
1964 PermissionUtils.grantPermission( in testCycleTop()
[all …]
DActivityManagerFgsBgStartTest.java1047 PermissionUtils.grantPermission( in testFgsStartSystemAlertWindow()
1850 PermissionUtils.grantPermission( in allowBgActivityStart()
/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/MediaProviderTranscode/src/android/mediaprovidertranscode/cts/
DTranscodeTestUtils.java234 public static void grantPermission(String packageName, String permission) { in grantPermission() method in TranscodeTestUtils
298 grantPermission(packageName, Manifest.permission.WRITE_EXTERNAL_STORAGE); in installAppWithStoragePermissions()
299 grantPermission(packageName, Manifest.permission.READ_EXTERNAL_STORAGE); in installAppWithStoragePermissions()
DTranscodeTest.java118 TranscodeTestUtils.grantPermission(getContext().getPackageName(), in setUp()
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/
DRedactUriDeviceTest.java28 import static android.scopedstorage.cts.lib.TestUtils.grantPermission;
313 grantPermission(APP_C.getPackageName(), Manifest.permission.ACCESS_MEDIA_LOCATION); in testSharedRedactedUri_openFileForRead_withLocationPerm()
332 grantPermission(APP_C.getPackageName(), Manifest.permission.ACCESS_MEDIA_LOCATION); in testSharedRedactedUri_openFdForRead_withLocationPerm()
DScopedStorageDeviceTest.java74 import static android.scopedstorage.cts.lib.TestUtils.grantPermission;
1255 grantPermission(APP_C.getPackageName(), Manifest.permission.ACCESS_MEDIA_LOCATION); in testAccessMediaLocationInvalidation()
1270 grantPermission(APP_C.getPackageName(), Manifest.permission.ACCESS_MEDIA_LOCATION); in testAccessMediaLocationInvalidation()
1290 grantPermission(APP_C_LEGACY.getPackageName(), in testAppUpdateInvalidation()
1299 grantPermission(APP_C_LEGACY.getPackageName(), in testAppUpdateInvalidation()
1370 grantPermission(packageName, permission); in assertAppOpInvalidation()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/permissions/
DPermissions.java180 sInstrumentedPackage.grantPermission(sUser, permission); in applyPermissions()
/cts/tests/tests/permission/permissionTestUtilLib/src/android/permission/cts/
DPermissionUtils.java194 public static void grantPermission(@NonNull String packageName, @NonNull String permission) in grantPermission() method in PermissionUtils
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DPackageReference.java232 public PackageReference grantPermission(UserReference user, String permission) { in grantPermission() method in PackageReference
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DBaseDevicePolicyTest.java1233 grantPermission(deviceAdminPkg, PERMISSION_INTERACT_ACROSS_USERS, userId, "its PO needs to " in grantDpmWrapperPermissions()
1245 protected void grantPermission(String pkg, String permission, int userId, String reason) in grantPermission() method in BaseDevicePolicyTest
DDeviceOwnerTest.java1137 grantPermission(DEVICE_OWNER_PKG, PERMISSION_INTERACT_ACROSS_USERS, mDeviceOwnerUserId, in testListForegroundAffiliatedUsers_onlyForegroundUserCalledByDeviceOwner()
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java164 public static void grantPermission(String packageName, String permission) { in grantPermission() method in TestUtils
586 grantPermission(packageName, Manifest.permission.READ_EXTERNAL_STORAGE); in installApp()