Home
last modified time | relevance | path

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

12

/cts/tests/tests/security/src/android/security/cts/
DPermissionBackupCertificateCheckTest.kt106 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)) in testRestore_sameCert_restoresRuntimePermissions()
107 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)) in testRestore_sameCert_restoresRuntimePermissions()
130 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_FINE_LOCATION)) in testRestore_diffCert_doesNotGrantRuntimePermissions()
131 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)) in testRestore_diffCert_doesNotGrantRuntimePermissions()
154 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)) in testRestore_midHistoryToRotated_restoresRuntimePermissions()
155 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)) in testRestore_midHistoryToRotated_restoresRuntimePermissions()
178 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)) in testRestore_origToRotated_restoresRuntimePermissions()
179 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)) in testRestore_origToRotated_restoresRuntimePermissions()
202 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)) in testRestore_rotatedToMidHistory_restoresRuntimePermissions()
203 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)) in testRestore_rotatedToMidHistory_restoresRuntimePermissions()
[all …]
DRolePermissionOverrideTest.kt132 assertThat(packageManager.checkPermission(permissionName, packageName)).isEqualTo( in assertPermissionState()
DBasePermissionUiTest.kt277 packageManager.checkPermission(permissionName, APP_PACKAGE_NAME) in <lambda>()
/cts/tests/backup/src/android/backup/cts/
DPermissionTest.java108 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantDeniedRuntimePermission()
109 assertEquals(PERMISSION_DENIED, checkPermission(APP, READ_CONTACTS)); in testGrantDeniedRuntimePermission()
153 assertEquals(PERMISSION_GRANTED, checkPermission(APP, WRITE_CONTACTS)); in testNoTriStateRuntimePermission()
155 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testNoTriStateRuntimePermission()
156 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testNoTriStateRuntimePermission()
195 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundRuntimePermission()
196 assertEquals(PERMISSION_DENIED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testGrantForegroundRuntimePermission()
235 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_FINE_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
236 assertEquals(PERMISSION_GRANTED, checkPermission(APP, ACCESS_BACKGROUND_LOCATION)); in testGrantForegroundAndBackgroundRuntimePermission()
325 eventually(() -> assertEquals(PERMISSION_DENIED, checkPermission(APP, WRITE_CONTACTS))); in testRestoreOfFlagDoesNotGrantPermission()
[all …]
/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/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/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/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/
DPermissionUtils.java141 public static void checkPermission(String permission, int expected, String packageName) { in checkPermission() method in PermissionUtils
142 checkPermission(getContext(), permission, expected, packageName); in checkPermission()
145 public static void checkPermission(Context context, String permission, int expected, in checkPermission() method in PermissionUtils
150 assertPermission(permission, packageName, pm.checkPermission(permission, packageName), in checkPermission()
184 if (context.checkPermission(permission, -1, packageInfo.applicationInfo.uid) in checkPermissionAndAppOps()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-40126/src/android/security/cts/CVE_2023_40126/
DDeviceTest.java82 && packageManager.checkPermission(READ_EXTERNAL_STORAGE, contactsPackageName) in testPocCVE_2023_40126()
92 packageManager.checkPermission( in testPocCVE_2023_40126()
/cts/tests/tests/telecom/ThirdPtyInCallServiceTestApp/src/android/telecom/cts/thirdptyincallservice/
DCtsThirdPartyInCallServiceControl.java56 return getPackageManager().checkPermission(permission
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DPermissionsTest.java175 PermissionUtils.checkPermission(permission, PERMISSION_GRANTED, PRE_M_APP_PACKAGE_NAME); in assertCannotSetPermissionGrantStatePreMApp()
205 PermissionUtils.checkPermission(context, permission, PERMISSION_GRANTED, in assertCanSetPermissionGrantStatePreMApp()
330 PermissionUtils.checkPermission(READ_CONTACTS, PERMISSION_DENIED, in testPermissionPrompts()
334 PermissionUtils.checkPermission(READ_CONTACTS, PERMISSION_GRANTED, in testPermissionPrompts()
/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/contactsprovider/src/android/provider/cts/contacts/
DContactsContractIntentsTest.java76 if (packageManager.checkPermission( in testSetDefaultAccount()
/cts/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/src/com/android/cts/packageinstallerpermissionwhitelistapp/
DPermissionWhitelistTest.kt92 assertThat(packageManager.checkPermission(permission, TARGET_PKG)) in removeWhitelistRestrictedPermission()
/cts/tests/tests/security/src/android/security/cts/CVE_2023_20916/
DCVE_2023_20916.java64 context.checkPermission(android.Manifest.permission.ACCESS_SHORTCUTS, in testPocCVE_2023_20916()
/cts/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/src/android/appsecurity/cts/v3rotationtests/
DV3RotationTest.java169 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasPerm()
176 pm.checkPermission(PERMISSION_NAME, COMPANION_PKG) in testHasNoPerm()
/cts/tests/location/common/src/android/location/cts/common/
DTestUtils.java179 if (pm.checkPermission(permission, packageName) == PackageManager.PERMISSION_GRANTED) { in getPackagesWithPermissions()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21254/test-app/src/android/security/cts/CVE_2023_21254_test/
DDeviceTest.java74 return pm.checkPermission(RECORD_AUDIO, helperAppPkg) in testPocCVE_2023_21254()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21249/test-app/src/android/security/cts/CVE_2023_21249_test/
DDeviceTest.java76 return pm.checkPermission(ACCESS_COARSE_LOCATION, helperAppPkg) in testPocCVE_2023_21249()
/cts/hostsidetests/appsecurity/test-apps/UseProcessSuccess/src/com/android/cts/useprocess/
DBaseNetworkService.java126 int hasPerm = checkPermission(android.Manifest.permission.INTERNET,
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBaseDefaultPermissionGrantPolicyTest.java619 if (packageManager.checkPermission(permission, packageInfo.packageName) in checkDefaultGrantsInCorrectState()
629 && packageManager.checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, in checkDefaultGrantsInCorrectState()
643 if (!fixed && packageManager.checkPermission(permission, packageInfo.packageName) in checkDefaultGrantsInCorrectState()
675 && packageManager.checkPermission(requestedPermission, in checkPackagesForUnexpectedGrants()
DPermissionUtils.java188 return getTargetContext().getPackageManager().checkPermission(permission, packageName) in isPermissionGranted()
/cts/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/src/com/android/cts/accountmanager/
DAccountManagerCrossUserTest.java222 assertThat(mContext.getPackageManager().checkPermission(permission, in assertPermissionRevoked()
/cts/hostsidetests/scopedstorage/redacturi/src/android/scopedstorage/cts/redacturi/
DRedactUriDeviceTest.java26 import static android.scopedstorage.cts.lib.TestUtils.checkPermission;
122 assertThat(checkPermission(APP_B_NO_PERMS, in setupApps()
/cts/tests/tests/virtualdevice/applaunch/src/android/virtualdevice/cts/applaunch/
DVirtualDevicePermissionTest.java95 mPackageManager.checkPermission(DANGEROUS_PERMISSION_GRANTED, STREAMED_APP_PACKAGE)) in setUp()

12