Home
last modified time | relevance | path

Searched refs:checkPermission (Results 1 – 25 of 38) sorted by relevance

12

/cts/tests/tests/permission/src/android/permission/cts/
DUndefinedGroupPermissionTest.kt106 Assert.assertEquals(mPm!!.checkPermission(CAMERA, APP_PKG_NAME), in testCustomPermissionGrantedAlone()
108 Assert.assertEquals(mPm!!.checkPermission(RECORD_AUDIO, APP_PKG_NAME), in testCustomPermissionGrantedAlone()
110 Assert.assertEquals(mPm!!.checkPermission(TEST, APP_PKG_NAME), in testCustomPermissionGrantedAlone()
118 Assert.assertEquals(mPm!!.checkPermission(CAMERA, APP_PKG_NAME), in testCustomPermissionGrantedAlone()
120 Assert.assertEquals(mPm!!.checkPermission(RECORD_AUDIO, APP_PKG_NAME), in testCustomPermissionGrantedAlone()
122 Assert.assertEquals(mPm!!.checkPermission(TEST, APP_PKG_NAME), in testCustomPermissionGrantedAlone()
152 Assert.assertEquals("$grantedPerm not granted.", mPm!!.checkPermission(grantedPerm, in testOtherGroupPermissionsNotGranted()
169 mPm!!.checkPermission(targetPermission, in testOtherGroupPermissionsNotGranted()
173 Assert.assertEquals(mPm!!.checkPermission(targetPermission, APP_PKG_NAME), in testOtherGroupPermissionsNotGranted()
DOneTimePermissionTest.java201 .checkPermission(ACCESS_FINE_LOCATION, APP_PKG_NAME)); in testStickyServiceMaintainsPermissionOnRestart()
208 .checkPermission(ACCESS_FINE_LOCATION, APP_PKG_NAME)), timeoutMillis); in assertGrantedState()
DProviderPermissionTest.java250 final boolean grantedMedia = pm.checkPermission(WRITE_MEDIA_STORAGE, in testWriteMediaStorage()
262 final boolean grantedStorage = pm.checkPermission(WRITE_EXTERNAL_STORAGE, in testWriteMediaStorage()
DStorageEscalationTest.kt113 Assert.assertEquals(granted, userContext.packageManager.checkPermission(permName, in <lambda>()
DRevokePermissionTest.kt145 assertEquals(PERMISSION_GRANTED, pm.checkPermission(READ_CALENDAR, APP_PKG_NAME)) in testRevoke()
/cts/tests/backup/src/android/backup/cts/
DPermissionTest.java107 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantDeniedRuntimePermission()
108 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)); in testGrantDeniedRuntimePermission()
152 assertEquals(PERMISSION_GRANTED, checkPermission(APP, WRITE_CONTACTS)); in testNoTriStateRuntimePermission()
154 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testNoTriStateRuntimePermission()
155 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testNoTriStateRuntimePermission()
194 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundRuntimePermission()
195 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testGrantForegroundRuntimePermission()
234 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
235 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
324 eventually(() -> assertEquals(PERMISSION_DENIED, checkPermission(APP, WRITE_CONTACTS))); in testRestoreOfFlagDoesNotGrantPermission()
[all …]
/cts/tests/tests/permission2/src/android/permission2/cts/
DPermissionMaxSdkVersionTest.java39 int result = mContext.checkPermission(UNGRANTABLE_PERMISSION, in testMaxSdkInPast()
52 int result = mContext.checkPermission(GRANTABLE_PERMISSION, in testMaxSdkInFuture()
/cts/tests/tests/content/src/android/content/pm/cts/
DPermissionFeatureTest.java76 pm.checkPermission(permName, getContext().getPackageName())); in assertPermissionGranted()
82 pm.checkPermission(permName, getContext().getPackageName())); in assertPermissionDenied()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPermissionsTest.java273 PermissionUtils.checkPermission(DEVELOPMENT_PERMISSION, PERMISSION_DENIED, in assertCannotSetPermissionGrantStateDevelopmentPermission()
292 PermissionUtils.checkPermission(permission, PERMISSION_GRANTED, PRE_M_APP_PACKAGE_NAME); in assertCannotSetPermissionGrantStatePreMApp()
312 PermissionUtils.checkPermission(permission, PERMISSION_GRANTED, PRE_M_APP_PACKAGE_NAME); in assertCanSetPermissionGrantStatePreMApp()
433 PermissionUtils.checkPermission(READ_CONTACTS, PERMISSION_DENIED, in testPermissionPrompts()
437 PermissionUtils.checkPermission(READ_CONTACTS, PERMISSION_GRANTED, in testPermissionPrompts()
454 PermissionUtils.checkPermission(sensorPermission, PERMISSION_GRANTED, in testSensorsRelatedPermissionsCannotBeGranted()
477 PermissionUtils.checkPermission(sensorPermission, PERMISSION_DENIED, in testSensorsRelatedPermissionsNotGrantedViaPolicy()
485 PermissionUtils.checkPermission(sensorPermission, PERMISSION_GRANTED, in testSensorsRelatedPermissionsNotGrantedViaPolicy()
529 assertEquals(mContext.getPackageManager().checkPermission(permission, in assertFailedToSetPermissionGrantState()
/cts/hostsidetests/appsecurity/test-apps/LocationPolicyApp/src/android/appsecurity/cts/locationpolicy/
DLocationPolicyTest.java47 pm.checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, in testLocationPolicyPermissions()
51 pm.checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, in testLocationPolicyPermissions()
/cts/tests/tests/permission3/src/android/permission3/cts/
DPermissionTapjackingTest.kt91 if (packageManager.checkPermission(ACCESS_FINE_LOCATION, APP_PACKAGE_NAME) == in tryClicking()
109 if (packageManager.checkPermission(ACCESS_FINE_LOCATION, APP_PACKAGE_NAME) == in tryClicking()
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DPermissionUtils.java118 public static void checkPermission(String permission, int expected, String packageName) { in checkPermission() method in PermissionUtils
120 .checkPermission(permission, packageName), expected); in checkPermission()
134 if (getContext().checkPermission(permission, -1, packageInfo.applicationInfo.uid) in checkPermissionAndAppOps()
/cts/hostsidetests/appsecurity/test-apps/keysets/testApp/src/com/android/cts/keysets/
DKeySetPermissionsTest.java38 … pm.checkPermission(KEYSET_PERM_NAME, KEYSET_APP_PKG) == PackageManager.PERMISSION_GRANTED); in testHasPerm()
/cts/tests/tests/telecom/ThirdPtyInCallServiceTestApp/src/android/telecom/cts/thirdptyincallservice/
DCtsThirdPartyInCallServiceControl.java56 return getPackageManager().checkPermission(permission
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DStepSensorPermissionTestActivity.java123 checkPermission(Manifest.permission.ACTIVITY_RECOGNITION, permissionGranted); in runTest()
154 private void checkPermission(String permission, boolean expected) { in checkPermission() method in StepSensorPermissionTestActivity
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/
DV3RotationTest.java122 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasPerm()
129 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasNoPerm()
/cts/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/src/com/android/cts/packageinstallerpermissionwhitelistapp/
DPermissionWhitelistTest.kt92 assertThat(packageManager.checkPermission(permission, TARGET_PKG)) in removeWhitelistRestrictedPermission()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBaseDefaultPermissionGrantPolicyTest.java542 if (packageManager.checkPermission(permission, packageInfo.packageName) in checkDefaultGrantsInCorrectState()
552 && packageManager.checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, in checkDefaultGrantsInCorrectState()
564 if (!fixed && packageManager.checkPermission(permission, packageInfo.packageName) in checkDefaultGrantsInCorrectState()
596 && packageManager.checkPermission(requestedPermission, in checkPackagesForUnexpectedGrants()
/cts/hostsidetests/appsecurity/test-apps/UseProcessSuccess/src/com/android/cts/useprocess/
DBaseNetworkService.java126 int hasPerm = checkPermission(android.Manifest.permission.INTERNET,
/cts/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/src/com/android/cts/accountmanager/
DAccountManagerCrossUserTest.java235 assertThat(mContext.getPackageManager().checkPermission(permission, in assertPermissionRevoked()
/cts/tests/tests/content/src/android/content/cts/
DContextTest.java1253 int returnValue = mContext.checkPermission( in testCheckPermissionGranted()
1259 int returnValue = mContext.checkPermission( in testCheckPermissionNotGranted()
1266 int returnValue = mContext.checkPermission(NOT_GRANTED_PERMISSION, 1, ROOT_UID); in testCheckPermissionRootUser()
1273 int returnValue = mContext.checkPermission(null, 0, ROOT_UID); in testCheckPermissionInvalidRequest()
1279 int returnValue = mContext.checkPermission(GRANTED_PERMISSION, 1, -11); in testCheckPermissionInvalidRequest()
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java1084 () -> granted == checkPermission(packageName, perm), in pollForPermission()
1092 public static boolean checkPermission(String packageName, String perm) { in checkPermission() method in TestUtils
1108 public static boolean checkPermission(TestApp app, String perm) { in checkPermission() method in TestUtils
1109 return checkPermission(app.getPackageName(), perm); in checkPermission()
1313 if (context.checkPermission(permission, pid, uid) != PackageManager.PERMISSION_GRANTED) { in checkPermissionAndAppOp()
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/
DRedactUriDeviceTest.java25 import static android.scopedstorage.cts.lib.TestUtils.checkPermission;
119 assertThat(checkPermission(APP_B_NO_PERMS, in setupApps()
/cts/tests/tests/permission/permissionTestUtilLib/src/android/permission/cts/
DPermissionUtils.java151 return sContext.checkPermission(permission, Process.myPid(), in isPermissionGranted()
/cts/tests/tests/role/src/android/app/role/cts/
DRoleManagerTest.java906 assertThat(sPackageManager.checkPermission(android.Manifest.permission.SEND_SMS, in addSmsRoleHolderThenPermissionIsGranted()
918 assertThat(sPackageManager.checkPermission(android.Manifest.permission.SEND_SMS, in removeSmsRoleHolderThenPermissionIsRevoked()
932 assertThat(sPackageManager.checkPermission(android.Manifest.permission.SEND_SMS, in removeSmsRoleHolderThenDialerRolePermissionIsRetained()

12