Home
last modified time | relevance | path

Searched refs:PermissionContext (Results 1 – 25 of 67) sorted by relevance

123

/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/
DPermissionsController.java22 PermissionContext withPermission(String... permissions); in withPermission()
24 PermissionContext withPermissionOnVersion(int sdkVersion, String... permissions); in withPermissionOnVersion()
26 PermissionContext withPermissionOnVersionAtLeast(int minSdkVersion, String... permissions); in withPermissionOnVersionAtLeast()
28 PermissionContext withPermissionOnVersionAtMost(int maxSdkVersion, String... permissions); in withPermissionOnVersionAtMost()
30 PermissionContext withPermissionOnVersionBetween( in withPermissionOnVersionBetween()
33 PermissionContext withoutPermission(String... permissions); in withoutPermission()
36 PermissionContext withAppOp(String... appOps); in withAppOp()
38 PermissionContext withAppOpOnVersion(int sdkVersion, String... appOps); in withAppOpOnVersion()
40 PermissionContext withAppOpOnVersionAtLeast(int minSdkVersion, String... appOps); in withAppOpOnVersionAtLeast()
42 PermissionContext withAppOpOnVersionAtMost(int maxSdkVersion, String... appOps); in withAppOpOnVersionAtMost()
[all …]
DPermissionContextModifier.java20 public interface PermissionContextModifier extends PermissionContext, PermissionsController {
DPermissionContext.java26 public interface PermissionContext extends AutoCloseable { interface
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/roles/
DRoles.java35 import com.android.bedstead.permissions.PermissionContext;
64 try (PermissionContext p = TestApis.permissions().withPermission( in setBypassingRoleQualification()
76 try (PermissionContext p = TestApis.permissions().withPermission( in getRoleHolders()
87 try (PermissionContext p = TestApis.permissions().withPermission( in getRoleHoldersAsUser()
DRoleContext.java23 import com.android.bedstead.permissions.PermissionContext;
48 try (PermissionContext p = TestApis.permissions().withPermission( in close()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicyDrawableResources.java28 import com.android.bedstead.permissions.PermissionContext;
69 try (PermissionContext p = TestApis.permissions().withPermission( in set()
86 try (PermissionContext p = TestApis.permissions().withPermission( in reset()
DDevicePolicyStringResources.java28 import com.android.bedstead.permissions.PermissionContext;
78 try (PermissionContext p = TestApis.permissions().withPermission( in set()
98 try (PermissionContext p = TestApis.permissions().withPermission( in reset()
DUserRestrictions.java26 import com.android.bedstead.permissions.PermissionContext;
58 try (PermissionContext p = TestApis.permissions().withPermission(INTERACT_ACROSS_USERS)) { in isSet()
DDeviceOwner.java38 import com.android.bedstead.permissions.PermissionContext;
87 try (PermissionContext p = in remove()
129 try (PermissionContext p = in removeTestApp()
193 try (PermissionContext p = in setType()
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppPermissionContext.java20 import com.android.bedstead.permissions.PermissionContext;
155 public PermissionContext withAppOpOnVersion(int sdkVersion, String... appOps) { in withAppOpOnVersion()
164 public PermissionContext withAppOpOnVersionAtLeast(int minSdkVersion, String... appOps) { in withAppOpOnVersionAtLeast()
173 public PermissionContext withAppOpOnVersionAtMost(int maxSdkVersion, String... appOps) { in withAppOpOnVersionAtMost()
182 public PermissionContext withAppOpOnVersionBetween( in withAppOpOnVersionBetween()
DTestAppActivityReference.java30 import com.android.bedstead.permissions.PermissionContext;
72 try (PermissionContext p = in start()
92 try (PermissionContext p = in start()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/location/
DLocations.java30 import com.android.bedstead.permissions.PermissionContext;
64 try (PermissionContext p = TestApis.permissions().withPermission( in setLocationEnabled()
85 try (PermissionContext p = TestApis.permissions().withPermission( in getLastKnownLocation()
DLocationProvider.java31 import com.android.bedstead.permissions.PermissionContext;
53 try (PermissionContext p = TestApis.permissions().withAppOp(OPSTR_MOCK_LOCATION)) { in addAndEnableTestProvider()
77 try (PermissionContext p = TestApis.permissions().withAppOp(OPSTR_MOCK_LOCATION)) { in removeTestProvider()
/cts/tests/tests/content/src/android/content/pm/cts/
DLauncherAppsForHiddenProfilesTest.java62 import com.android.bedstead.permissions.PermissionContext;
119 PermissionContext p = in testGeneralApis_notDefaultLauncherWithNormalPerm_hiddenProfileInfoStripped()
135 PermissionContext p = in testGeneralApis_defaultLauncherNoPerms_hiddenProfileInfoStripped()
154 PermissionContext p = in testGeneralApis_withSystemPerm_hiddenProfileInfoAvailable()
170 PermissionContext p = in testGeneralApis_defaultLauncherWithNormalPerm_hiddenProfileInfoAvailable()
172 PermissionContext p2 = in testGeneralApis_defaultLauncherWithNormalPerm_hiddenProfileInfoAvailable()
208 PermissionContext p = in testAppChangesCallbacks_defaultLauncherWithNormalPerm_callbacksReceived()
210 PermissionContext p2 = in testAppChangesCallbacks_defaultLauncherWithNormalPerm_callbacksReceived()
228 PermissionContext p = in testAppChangesCallbacks_notDefaultLauncherWithNormalPerm_callbacksNotReceived()
299 try (PermissionContext p = in assertHiddenProfileInfoStripped()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/bluetooth/
DBluetooth.java40 import com.android.bedstead.permissions.PermissionContext;
74 try (PermissionContext p = TestApis.permissions() in enable()
100 try (PermissionContext p = TestApis.permissions() in disable()
127 try (PermissionContext p = in isEnabled()
147 try (PermissionContext p = TestApis.permissions().withPermission(INTERACT_ACROSS_USERS)) { in findPackageName()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/utils/
DPolicyEngineUtils.java35 import com.android.bedstead.permissions.PermissionContext;
52 try (PermissionContext p = TestApis.permissions().withPermission( in getBooleanPolicyState()
71 try (PermissionContext p = TestApis.permissions().withPermission( in getStringSetPolicyState()
90 try (PermissionContext p = TestApis.permissions().withPermission( in getLockTaskPolicyState()
104 try (PermissionContext p = TestApis.permissions().withPermission( in getComponentNamePolicyState()
DTestArtifactUtils.java27 import com.android.bedstead.permissions.PermissionContext;
59 try (PermissionContext p = TestApis.permissions() in withWritableBaseDir()
/cts/common/device-side/interactive/automation/src/main/java/com/android/interactive/steps/enterprise/settings/
DNavigateToPersonalUsbSettingsStepAutomation.java27 import com.android.bedstead.permissions.PermissionContext;
36 try (PermissionContext p = TestApis.permissions().withPermission(MANAGE_USB)) { in automate()
/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/
DTestAppInstanceTest.java48 import com.android.bedstead.permissions.PermissionContext;
433 PermissionContext p = in bluetoothManager_returnsUsableInstance()
443 PermissionContext p = in notificationManager_returnsUsableInstance()
467 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateAppliesToCallsToTestApp()
477 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateDoesNotApplyToOtherTestApps()
486 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateDoesNotApplyToInstrumentedApp()
495 PermissionContext p = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_permissionStateDoesNotApplyToInstrumentedAppAfterCall()
506 PermissionContext p = TestApis.permissions().withoutPermission(READ_CONTACTS); in permissions_withPermission_instrumentedPermissionStateDoesNotAffectTestApp()
507 PermissionContext p2 = testApp.permissions().withPermission(READ_CONTACTS)) { in permissions_withPermission_instrumentedPermissionStateDoesNotAffectTestApp()
518 PermissionContext p = testApp.permissions().withAppOp(OPSTR_START_FOREGROUND)) { in permissions_withAppOp_appOpIsAllowedForTestApp()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/accounts/
DAccounts.java28 import com.android.bedstead.permissions.PermissionContext;
92 try (PermissionContext p = TestApis.permissions().withPermission( in all()
111 try (PermissionContext p = TestApis.permissions().withPermission( in getByType()
/cts/tests/devicepolicy/telephony/src/android/devicepolicy/cts/telephony/
DWorkProfileTelephonyTest.java87 import com.android.bedstead.permissions.PermissionContext;
143 try (PermissionContext p = TestApis.permissions().withPermission(READ_PHONE_NUMBERS, in setupClass()
153 try (PermissionContext p = TestApis.permissions().withPermission(MODIFY_PHONE_STATE)) { in teardownClass()
287 try (PermissionContext p = TestApis.permissions().withPermission(READ_SMS)) { in allManagedSubscriptions_accessWorkMessageFromPersonalProfile_fails()
335 try (PermissionContext p = TestApis.permissions().withPermission(READ_SMS)) { in allManagedSubscriptions_accessWorkMessageFromWorkProfile_works()
374 PermissionContext p = dialerApp.permissions().withPermission(CALL_PHONE).withAppOp( in placeCall_fromWorkProfile_allManagedSubscriptions_works()
411 PermissionContext p = dialerApp.permissions().withPermission(CALL_PHONE).withAppOp( in placeCall_fromPersonalProfile_allManagedSubscriptions_fails()
446 PermissionContext p = dialerApp.permissions().withPermission(READ_PHONE_STATE); in getCallCapablePhoneAccounts_fromWorkProfile_allManagedSubscriptions_notEmpty()
478 PermissionContext p = dialerApp.permissions().withPermission(READ_PHONE_STATE); in getCallCapablePhoneAccounts_fromPersonalProfile_allManagedSubscriptions_emptyList()
510 PermissionContext p = dialerApp.permissions().withPermission(CALL_PHONE).withAppOp( in allManagedSubscriptions_accessWorkCallLogFromWorkProfile_works()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/activities/
DActivities.java43 import com.android.bedstead.permissions.PermissionContext;
100 try (PermissionContext p = TestApis.permissions().withPermission(REAL_GET_TASKS)) { in recentActivities()
178 try (PermissionContext p = TestApis.permissions().withPermission( in removeRootTasksWithActivityTypes()
183 try (PermissionContext p = TestApis.permissions().withPermission( in removeRootTasksWithActivityTypes()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DNotificationTest.java32 import com.android.bedstead.permissions.PermissionContext;
69PermissionContext p = initialUserApp.permissions().withPermission(POST_NOTIFICATIONS)) { in notification_fromPersonalProfile_isNotBadged()
87PermissionContext p = workProfileApp.permissions().withPermission(POST_NOTIFICATIONS)) { in notification_fromWorkProfile_isBadged()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/users/
DUserReference.java57 import com.android.bedstead.permissions.PermissionContext;
158 try (PermissionContext p = in isMain()
451 try (PermissionContext p = TestApis.permissions().withPermission(CREATE_USERS)) { in name()
481 try (PermissionContext p = TestApis.permissions().withPermission(INTERACT_ACROSS_USERS)) { in isRunning()
499 try (PermissionContext p = TestApis.permissions().withPermission(INTERACT_ACROSS_USERS)) { in isVisible()
514 try (PermissionContext p = TestApis.permissions().withPermission(INTERACT_ACROSS_USERS)) { in isForeground()
538 try (PermissionContext p = TestApis.permissions().withPermission(INTERACT_ACROSS_USERS)) { in isUnlocked()
553 try (PermissionContext p = TestApis.permissions() in type()
603 try (PermissionContext p = in parent()
656 try (PermissionContext p = in setSetupComplete()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DKeepUninstalledPackagesBuilder.java29 import com.android.bedstead.permissions.PermissionContext;
62 try (PermissionContext p = in commit()

123