Home
last modified time | relevance | path

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

/cts/tests/tests/content/src/android/content/pm/cts/
DPermissionFeatureTest.java28 pm.checkPermission("android.content.cts.REQUIRED_FEATURE_DEFINED", in testPermissionRequiredFeatureDefined()
35 pm.checkPermission("android.content.cts.REQUIRED_FEATURE_UNDEFINED", in testPermissionRequiredFeatureUndefined()
42 pm.checkPermission("android.content.cts.REQUIRED_NOT_FEATURE_DEFINED", in testPermissionRequiredNotFeatureDefined()
49 pm.checkPermission("android.content.cts.REQUIRED_NOT_FEATURE_UNDEFINED", in testPermissionRequiredNotFeatureUndefined()
56 pm.checkPermission("android.content.cts.REQUIRED_MULTI_DENY", in testPermissionRequiredMultiDeny()
63 pm.checkPermission("android.content.cts.REQUIRED_MULTI_GRANT", in testPermissionRequiredMultiGrant()
DPackageManagerTest.java521 mPackageManager.checkPermission(GRANTED_PERMISSION_NAME, PACKAGE_NAME)); in testCheckPermissionGranted()
527 mPackageManager.checkPermission(NOT_GRANTED_PERMISSION_NAME, PACKAGE_NAME)); in testCheckPermissionNotGranted()
/cts/tests/backup/src/android/backup/cts/
DPermissionTest.java103 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantDeniedRuntimePermission()
104 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)); in testGrantDeniedRuntimePermission()
142 assertEquals(PERMISSION_GRANTED, checkPermission(APP, WRITE_CONTACTS)); in testNoTriStateRuntimePermission()
144 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testNoTriStateRuntimePermission()
145 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testNoTriStateRuntimePermission()
179 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundRuntimePermission()
180 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testGrantForegroundRuntimePermission()
210 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
211 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
285 eventually(() -> assertEquals(PERMISSION_DENIED, checkPermission(APP, WRITE_CONTACTS))); in testRestoreOfFlagDoesNotGrantPermission()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPermissionsTest.java105 private int checkPermission(String permission, int uid, String packageName) { in checkPermission() method in PermissionsTest
106 if (mContext.checkPermission(permission, -1, uid) == PackageManager.PERMISSION_DENIED) { in checkPermission()
309 assertEquals(expected, mPackageManager.checkPermission(permission, in assertPermissionRequest()
314 assertEquals(expected, mPackageManager.checkPermission(PERMISSION_NAME, in assertPermissionGrantState()
351 assertEquals(mPackageManager.checkPermission(DEVELOPMENT_PERMISSION, in assertFailedToSetDevelopmentPermissionGrantState()
368 checkPermission(PERMISSION_NAME, packageInfo.applicationInfo.uid, in assertCannotSetPermissionGrantStateAppPreM()
381 assertEquals(mPackageManager.checkPermission(PERMISSION_NAME, in assertCanSetPermissionGrantStateAppPreM()
390 boolean isGranted = (checkPermission(PERMISSION_NAME, packageInfo.applicationInfo.uid, in assertCanSetPermissionGrantStateAppPreM()
/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/hostsidetests/appsecurity/test-apps/UsePermissionApp22/src/com/android/cts/usepermission/
DUsePermissionTest22.java47 mContext.checkPermission(android.Manifest.permission.READ_CALENDAR, in testCompatDefault()
50 mContext.checkPermission(android.Manifest.permission.WRITE_CALENDAR, in testCompatDefault()
70 mContext.checkPermission(android.Manifest.permission.READ_CALENDAR, in testCompatRevoked_part2()
73 mContext.checkPermission(android.Manifest.permission.WRITE_CALENDAR, in testCompatRevoked_part2()
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/
DV3RotationTest.java89 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasPerm()
96 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasNoPerm()
/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/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/tests/tests/permission/src/android/permission/cts/
DProviderPermissionTest.java245 final boolean grantedMedia = pm.checkPermission(WRITE_MEDIA_STORAGE, in testWriteMediaStorage()
257 final boolean grantedStorage = pm.checkPermission(WRITE_EXTERNAL_STORAGE, in testWriteMediaStorage()
DPermissionControllerTest.java179 assertThat(sContext.getPackageManager().checkPermission(ACCESS_BACKGROUND_LOCATION, in revokeSinglePermission()
/cts/tests/tests/content/src/android/content/cts/
DContextTest.java1063 int returnValue = mContext.checkPermission( in testCheckPermissionGranted()
1069 int returnValue = mContext.checkPermission( in testCheckPermissionNotGranted()
1076 int returnValue = mContext.checkPermission(NOT_GRANTED_PERMISSION, 1, ROOT_UID); in testCheckPermissionRootUser()
1083 int returnValue = mContext.checkPermission(null, 0, ROOT_UID); in testCheckPermissionInvalidRequest()
1089 int returnValue = mContext.checkPermission(GRANTED_PERMISSION, 1, -11); in testCheckPermissionInvalidRequest()
DIntentTest.java784 if (mPm.checkPermission(android.Manifest.permission.SET_PREFERRED_APPLICATIONS, pkgName) in testResolveActivityMultipleMatch()
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/
DUiAutomationTest.java116 assertSame(packageManager.checkPermission(Manifest.permission.CAMERA, in testAdoptAllShellPermissions()
126 assertSame(packageManager.checkPermission(Manifest.permission.CAMERA, in testAdoptAllShellPermissions()
/cts/tests/tests/permission/permissionTestUtilLib/src/android/permission/cts/
DPermissionUtils.java142 return sContext.checkPermission(permission, Process.myPid(), in isPermissionGranted()
/cts/tests/tests/telecom/src/android/telecom/cts/
DThirdPartyCallScreeningServiceTest.java610 mPackageManager.checkPermission in verifyPermission()
/cts/tests/tests/provider/src/android/provider/cts/
DMediaStore_Video_MediaTest.java262 if (mContext.getPackageManager().checkPermission( in testLocationRedaction()
DMediaStore_Images_MediaTest.java351 if (mContext.getPackageManager().checkPermission(