Home
last modified time | relevance | path

Searched refs:hasPermission (Results 1 – 17 of 17) sorted by relevance

/cts/common/device-side/bedstead/modules/permissions/src/test/kotlin/com/android/bedstead/permissions/
DPermissionsTest.kt259 TestApis.permissions().hasPermission(permission.INTERACT_ACROSS_USERS_FULL) in hasPermission_permissionIsGranted_returnsTrue()
267 TestApis.permissions().hasPermission(permission.INTERACT_ACROSS_USERS_FULL) in hasPermission_permissionIsNotGranted_returnsFalse()
291 TestApis.permissions().hasPermission(permission.INTERACT_ACROSS_USERS_FULL) in withAppOpAndPermission_hasBoth()
303 TestApis.permissions().hasPermission(permission.INTERACT_ACROSS_USERS_FULL) in withoutAppOpAndWithPermission_hasPermissionButNotAppOp()
339 assertThat(TestApis.permissions().hasPermission(MANAGE_USERS)).isTrue() in withPermission_unadoptablePermission_withRoot_hasPermission()
347 assertThat(TestApis.permissions().hasPermission(INSTALL_PERMISSION)).isFalse() in withoutPermission_undroppablePermission_withRoot_doesNotHavePermission()
355 assertThat(TestApis.permissions().hasPermission(MANAGE_USERS)).isTrue() in ensureHasPermissionAnnotation_unadoptablePermission_withRoot_hasPermission()
362 assertThat(TestApis.permissions().hasPermission(INSTALL_PERMISSION)).isFalse() in ensureDoesNotHavePermissionAnnotation_undroppablePermission_withRoot_doesNotHavePermission()
370 .hasPermission(CREATE_USERS)).isTrue() in withPermission_flakeTest()
372 .hasPermission(INTERACT_ACROSS_USERS)).isTrue() in withPermission_flakeTest()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/
DPackageTest.java215 assertThat(sTestApp.pkg().hasPermission(USER_SPECIFIC_PERMISSION)).isTrue(); in grantPermission_permissionIsGranted()
228 assertThat(sTestApp.pkg().hasPermission(USER_SPECIFIC_PERMISSION)).isFalse(); in grantPermission_permissionIsUserSpecific_permissionIsGrantedOnlyForThatUser()
229 assertThat(sTestApp.pkg().hasPermission(sDeviceState.secondaryUser(), in grantPermission_permissionIsUserSpecific_permissionIsGrantedOnlyForThatUser()
280 assertThat(sTestApp.pkg().hasPermission(USER_SPECIFIC_PERMISSION)).isFalse(); in denyPermission_permissionIsNotGranted()
298 assertThat(sTestApp.pkg().hasPermission(USER_SPECIFIC_PERMISSION)).isFalse(); in denyPermission_alreadyDenied_doesNothing()
313 assertThat(sTestApp.pkg().hasPermission(sDeviceState.secondaryUser(), in denyPermission_permissionIsUserSpecific_permissionIsDeniedOnlyForThatUser()
315 assertThat(sTestApp.pkg().hasPermission(USER_SPECIFIC_PERMISSION)).isTrue(); in denyPermission_permissionIsUserSpecific_permissionIsDeniedOnlyForThatUser()
369 assertThat(pkg.hasPermission(sUser, ACCESS_NETWORK_STATE_PERMISSION)).isTrue(); in grantedPermission_includesKnownInstallPermission()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DPermissionGrantTest.java251 sTestApp.pkg().hasPermission(permission)).isFalse(); in denyPermission_permissionIsDenied()
275 sTestApp.pkg().hasPermission(GRANTABLE_PERMISSION)).isTrue(); in grantPermission_permissionIsGranted()
297 sTestApp.pkg().hasPermission(permission)).isTrue(); in denyPermission_doesNotApply_permissionIsNotDenied()
318 sTestApp.pkg().hasPermission(permission)).isFalse(); in grantPermission_doesNotApply_permissionIsNotGranted()
353 .that(sTestApp.pkg().hasPermission( in grantDevelopmentPermission_cannotGrant()
470 sTestApp.pkg().hasPermission(READ_SMS)).isTrue(); in grantSmsPermission_permissionIsGranted()
490 sTestApp.pkg().hasPermission(permission)).isTrue(); in grantSensorPermission_permissionIsGranted()
511 sTestApp.pkg().hasPermission(READ_SMS)).isFalse(); in grantSmsPermission_doesNotApplyToUser_permissionIsNotGranted()
532 sTestApp.pkg().hasPermission(permission)).isFalse(); in grantSensorPermission_doesNotApplyToUser_permissionIsNotGranted()
668 () -> sNotInstalledTestApp.pkg().hasPermission(GRANTABLE_PERMISSION)) in setPermissionPolicy_grant_automaticallyGrantsPermissions()
[all …]
DManagedProvisioningTest.java51 .hasPermission(android.Manifest.permission.LAUNCH_DEVICE_MANAGER_SETUP)).isTrue(); in managedProvisioning_hasLaunchDeviceManagerSetupPermission()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DStepSensorPermissionTestActivity.java118 if (hasPermission(Manifest.permission.ACTIVITY_RECOGNITION) != permissionGranted) { in runTest()
149 private boolean hasPermission(String permission) { in hasPermission() method in StepSensorPermissionTestActivity
155 if (expected && !hasPermission(permission)) { in checkPermission()
157 } else if (!expected && hasPermission(permission)) { in checkPermission()
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/
DBedsteadJUnit4Test.java218 assertThat(TestApis.permissions().hasPermission(INTERACT_ACROSS_USERS_FULL)).isTrue(); in permissionTestAnnotation_generatesRunsWithOnePermissionOrOther()
219 if (TestApis.permissions().hasPermission(INTERACT_ACROSS_PROFILES)) { in permissionTestAnnotation_generatesRunsWithOnePermissionOrOther()
220 assertThat(TestApis.permissions().hasPermission(INTERACT_ACROSS_USERS)).isFalse(); in permissionTestAnnotation_generatesRunsWithOnePermissionOrOther()
222 assertThat(TestApis.permissions().hasPermission(INTERACT_ACROSS_USERS)).isTrue(); in permissionTestAnnotation_generatesRunsWithOnePermissionOrOther()
DDeviceStateTest.java995 .testApp().pkg().hasPermission(MANAGE_DEVICE_POLICY_BLUETOOTH)).isTrue(); in mostImportantCoexistenceTestAnnotation_hasDpcsWithPermission()
997 .testApp().pkg().hasPermission(MANAGE_DEVICE_POLICY_BLUETOOTH)).isTrue(); in mostImportantCoexistenceTestAnnotation_hasDpcsWithPermission()
1004 .testApp().pkg().hasPermission(MANAGE_DEVICE_POLICY_BLUETOOTH)).isTrue(); in mostRestrictiveCoexistenceTestAnnotation_hasDpcsWithPermission()
1006 .testApp().pkg().hasPermission(MANAGE_DEVICE_POLICY_BLUETOOTH)).isTrue(); in mostRestrictiveCoexistenceTestAnnotation_hasDpcsWithPermission()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DPackage.java394 assertWithMessage(message).that(hasPermission(user, permission)).isTrue(); in grantPermission()
423 if (!hasPermission(user, permission)) { in denyPermission()
441 assertWithMessage(message).that(hasPermission(user, permission)).isFalse(); in denyPermission()
552 public boolean hasPermission(UserReference user, String permission) { in hasPermission() method in Package
558 public boolean hasPermission(UserHandle user, String permission) { in hasPermission() method in Package
559 return hasPermission(TestApis.users().find(user), permission); in hasPermission()
563 public boolean hasPermission(String permission) { in hasPermission() method in Package
564 return hasPermission(TestApis.users().instrumented(), permission); in hasPermission()
/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/
DPermissions.java553 public boolean hasPermission(String permission) {
702 if (sInstrumentedPackage.hasPermission(user, permission)) {
717 if (!sInstrumentedPackage.hasPermission(sUser, permission)) {
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/mtp/
DMtpHostTestActivity.java251 if (!mUsbManager.hasPermission(mUsbDevice)) {
271 assertTrue(mUsbManager.hasPermission(mUsbDevice));
/cts/tests/tests/telecom/src/android/telecom/cts/
DThirdPartyCallScreeningServiceTest.java634 private void verifyPermission(boolean hasPermission) { in verifyPermission() argument
635 assertEquals(hasPermission, in verifyPermission()
/cts/apps/CtsVerifierUSBCompanion/src/com/android/cts/verifierusbcompanion/
DAccessoryTestCompanion.java73 if (mUsbManager.hasPermission(device)) { in runTest()
/cts/tests/tests/appenumeration/app/source/
DAndroid.bp217 manifest: "AndroidManifest-queriesNothing-hasPermission.xml",
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DBrailleDisplayControllerTest.java720 if (!usbManager.hasPermission(usbDevice)) { in connect_realUsbDevice_noPermission_throwsSecurityException()
/cts/tests/tests/wifi/src/android/net/wifi/aware/cts/
DSingleDeviceTest.java1841 boolean hasPermission = mContext.checkCallingOrSelfPermission(OVERRIDE_WIFI_CONFIG) in testAttachOffload()
1846 if (!hasPermission) { in testAttachOffload()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageStatsTest.java2677 private void verifyLocusIdEventVisibility(UsageEvents events, boolean hasPermission) { in verifyLocusIdEventVisibility() argument
2689 if (hasPermission) { in verifyLocusIdEventVisibility()
/cts/common/device-side/bedstead/remoteframeworkclasses/java/apis/
Dcurrent.txt20662 method public boolean hasPermission(android.hardware.usb.UsbDevice);
20663 method public boolean hasPermission(android.hardware.usb.UsbAccessory);