Home
last modified time | relevance | path

Searched refs:instrumented (Results 1 – 25 of 101) sorted by relevance

12345

/cts/common/device-side/bedstead/modules/multiuser/src/test/kotlin/com/android/bedstead/multiuser/
DUserReferenceTest.java256 UserReference user = TestApis.users().instrumented(); in serialNo_returnsSerialNo()
273 UserReference user = TestApis.users().instrumented(); in name_returnsName()
289 UserReference user = TestApis.users().instrumented(); in type_returnsType()
304 UserReference user = TestApis.users().instrumented(); in isPrimary_isPrimary_returnsTrue()
526 UserReference user = TestApis.users().instrumented(); in parent_noParent_returnsNull()
555 TestApis.users().instrumented().setPassword(PASSWORD); in setPassword_hasLockCredential()
557 assertThat(TestApis.users().instrumented().hasLockCredential()).isTrue(); in setPassword_hasLockCredential()
559 TestApis.users().instrumented().clearPassword(PASSWORD); in setPassword_hasLockCredential()
568 TestApis.users().instrumented().setPin(PIN); in setPin_hasLockCredential()
570 assertThat(TestApis.users().instrumented().hasLockCredential()).isTrue(); in setPin_hasLockCredential()
[all …]
/cts/common/device-side/bedstead/modules/enterprise/src/test/kotlin/com/android/bedstead/enterprise/
DEnterpriseAnnotationExecutorTest.kt256 assertThat(devicePolicy().getProfileOwner(users().instrumented())).isNotNull() in ensureHasProfileOwnerAnnotation_defaultUser_profileOwnerIsSet()
262 assertThat(devicePolicy().getProfileOwner(users().instrumented())).isNull() in ensureHasNoProfileOwnerAnnotation_defaultUser_profileOwnerIsNotSet()
289 assertThat(devicePolicy().getProfileOwner(users().instrumented())).isNotNull() in profileOwner_defaultUser_profileOwnerIsSet_returnsProfileOwner()
336 assertThat(users().instrumented()).isEqualTo(sDeviceState.dpc().user()) in includeRunOnBackgroundDeviceOwnerUserAnnotation_isRunningOnDeviceOwnerUser()
342 assertThat(users().current()).isNotEqualTo(users().instrumented()) in includeRunOnBackgroundDeviceOwnerUserAnnotation_isNotCurrentUser()
348 assertThat(users().instrumented().type().name()).isEqualTo(CLONE_PROFILE_TYPE_NAME) in includeRunOnCloneProfileAlongsideProfileOwnerUsingParentInstance_runsOnCloneProfile()
358 assertThat(users().instrumented().type().name()).isEqualTo(CLONE_PROFILE_TYPE_NAME) in includeRunOnCloneProfileAlongsideOrgOwnedProfileOwnerUsingParentInstance_runsOnCloneProfile()
368 assertThat(devicePolicy().getDeviceOwner()!!.user()).isEqualTo(users().instrumented()) in includeRunOnFinancedDeviceOwnerUserAnnotation_financedDeviceOwnerTypeSet()
375 assertThat(users().instrumented().type().name()).isEqualTo(MANAGED_PROFILE_TYPE_NAME) in includeRunOnOrganizationOwnedProfileOwnerAnnotation_isRunningOnOrganizationOwnedManagedProfile()
409 assertThat(sDeviceState.workProfile().parent()).isEqualTo(users().instrumented()) in includeRunOnParentOfProfileOwnerUsingProfileInstanceAnnotation_runningOnParentOfProfile()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/
DDevicePolicy.kt138 fun getProfileOwner(user: UserReference = TestApis.users().instrumented()): ProfileOwner? { in <lambda>()
252 fun clearOrganizationId(user: UserReference = TestApis.users().instrumented()) { in <lambda>()
294 if (user == TestApis.users().instrumented()) { in <lambda>()
534 user: UserReference = TestApis.users().instrumented() in <lambda>()
570 user: UserReference = TestApis.users().instrumented() in <lambda>()
581 fun autoTimeRequired(user: UserReference = TestApis.users().instrumented()) = in <lambda>()
590 user: UserReference = TestApis.users().instrumented() in <lambda>()
610 user: UserReference = TestApis.users().instrumented() in <lambda>()
631 devicePolicyManager(TestApis.users().instrumented()) in <lambda>()
647 fun userRestrictions(user: UserReference = TestApis.users().instrumented()): UserRestrictions { in <lambda>()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/
DPackage.java248 } else if (user.equals(TestApis.users().instrumented())) { in uninstall()
326 return enable(TestApis.users().instrumented()); in enable()
353 return disable(TestApis.users().instrumented()); in disable()
405 return grantPermission(TestApis.users().instrumented(), permission); in grantPermission()
410 return denyPermission(TestApis.users().instrumented(), permission); in denyPermission()
431 && user.equals(TestApis.users().instrumented())) { in denyPermission()
533 return runningProcess(TestApis.users().instrumented()); in runningProcess()
548 return installedOnUser(TestApis.users().instrumented()); in installedOnUser()
564 return hasPermission(TestApis.users().instrumented(), permission); in hasPermission()
569 if (TestApis.packages().instrumented().isInstantApp()) { in requestedPermissions()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/settings/
DGlobalSettingsTest.kt73 TestApis.settings().global().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>()
151 assertThat(TestApis.settings().global().getInt(TestApis.users().instrumented(), KEY)) in <lambda>()
158 TestApis.settings().global().getInt(TestApis.users().instrumented(), INVALID_KEY) in <lambda>()
165 TestApis.users().instrumented(), INVALID_KEY, INT_VALUE)).isEqualTo(INT_VALUE) in <lambda>()
217 TestApis.users().instrumented(), KEY, STRING_VALUE) in <lambda>()
268 assertThat(TestApis.settings().global().getString(TestApis.users().instrumented(), KEY)) in <lambda>()
332 TestApis.settings().global().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>()
333 TestApis.settings().global().putString(TestApis.users().instrumented(), KEY, in <lambda>()
336 TestApis.settings().global().reset(TestApis.users().instrumented()) in <lambda>()
340 TestApis.users().instrumented(), KEY) in <lambda>()
[all …]
DSecureSettingsTest.kt75 TestApis.settings().secure().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>()
164 Truth.assertThat(TestApis.settings().secure().getInt(TestApis.users().instrumented(), KEY)) in <lambda>()
171 TestApis.settings().secure().getInt(TestApis.users().instrumented(), INVALID_KEY) in <lambda>()
178 TestApis.users().instrumented(), INVALID_KEY, INT_VALUE)).isEqualTo(INT_VALUE) in <lambda>()
228 TestApis.settings().secure().putString(TestApis.users().instrumented(), KEY, STRING_VALUE) in <lambda>()
313 TestApis.settings().secure().getString(TestApis.users().instrumented(), KEY)) in <lambda>()
320 TestApis.users().instrumented(), INVALID_KEY)).isNull() in <lambda>()
326 TestApis.users().instrumented(), INVALID_KEY, STRING_VALUE)) in <lambda>()
388 TestApis.settings().secure().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>()
390 TestApis.settings().secure().reset(TestApis.users().instrumented()) in <lambda>()
[all …]
DSystemSettingsTest.kt68 TestApis.settings().system().putInt(TestApis.users().instrumented(), KEY, INT_VALUE) in <lambda>()
148 assertThat(TestApis.settings().system().getInt(TestApis.users().instrumented(), KEY)) in <lambda>()
155 TestApis.settings().system().getInt(TestApis.users().instrumented(), INVALID_KEY) in <lambda>()
162 TestApis.users().instrumented(), INVALID_KEY, INT_VALUE)).isEqualTo(INT_VALUE) in <lambda>()
214 TestApis.users().instrumented(), KEY, STRING_VALUE) in <lambda>()
264 TestApis.users().instrumented(), KEY)) in <lambda>()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DProfileOwnerTest.kt53 .builderForUser(TestApis.users().instrumented(), SET_PROFILE_OWNER_COMMAND) in <lambda>()
74 .builderForUser(TestApis.users().instrumented(), SET_PROFILE_OWNER_COMMAND) in <lambda>()
92 .parent(TestApis.users().instrumented()) in <lambda>()
116 TestApis.users().instrumented(), in <lambda>()
151 TestApis.users().instrumented(), in <lambda>()
186 TestApis.users().instrumented(), in <lambda>()
218 .builderForUser(TestApis.users().instrumented(), SET_PROFILE_OWNER_COMMAND) in <lambda>()
241 TestApis.users().instrumented(), in <lambda>()
DBackupTest.java94 TestApis.users().instrumented().type() in setBackupServiceEnabled_true_setsBackupServiceEnabled()
108 .isBackupServiceActive(TestApis.users().instrumented().userHandle())).isTrue(); in setBackupServiceEnabled_true_setsBackupServiceEnabled()
131 .isBackupServiceActive(TestApis.users().instrumented().userHandle())).isFalse(); in setBackupServiceEnabled_false_setsBackupServiceNotEnabled()
148 .isBackupServiceActive(TestApis.users().instrumented().userHandle())).isFalse(); in setBackupServiceEnabled_doesNotApply_doesNotSetBackupServiceEnabled()
257 TestApis.users().all().stream().filter(u -> (u != TestApis.users().instrumented() in ensureNoAdditionalUsers()
268 + TestApis.users().instrumented() + ", current user is " in ensureNoAdditionalUsers()
DCrossProfileAppsTest.java140 Package pkg = TestApis.packages().instrumented(); in cleanupOtherUsers()
142 .filter(p -> !p.user().equals(TestApis.users().instrumented())) in cleanupOtherUsers()
154 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in getTargetUserProfiles_doesNotContainOtherUser()
166 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in getTargetUserProfiles_containsOtherUser()
179 TestApis.packages().instrumented().uninstall(sDeviceState.otherUser()); in getTargetUserProfiles_appNotInstalledInOtherUser_doesNotContainOtherUser()
212 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isProfile_targetIsInvalid_throwsSecurityException()
230 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isProfile_profile_returnsTrue()
244 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isProfile_notProfile_returnsFalse()
261 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isManagedProfile_targetIsInvalid_throwsSecurityException()
277 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isManagedProfile_managedProfile_returnsTrue()
[all …]
DCreateAndManageUserTest.java145 UserReference instrumented = TestApis.users().instrumented(); in createAndManageUser_switchToUser_showsDisclaimer() local
154 instrumented.switchTo(); in createAndManageUser_switchToUser_showsDisclaimer()
156 instrumented.switchTo(); in createAndManageUser_switchToUser_showsDisclaimer()
DLockTaskTest.kt124 TestApis.users().instrumented().canShowActivities() in <lambda>()
411 TestApis.users().instrumented().canShowActivities() in <lambda>()
445 TestApis.users().instrumented().canShowActivities() in <lambda>()
477 TestApis.users().instrumented().canShowActivities() in <lambda>()
511 TestApis.users().instrumented().canShowActivities() in <lambda>()
548 TestApis.users().instrumented().canShowActivities() in <lambda>()
578 TestApis.users().instrumented().canShowActivities() in <lambda>()
608 TestApis.users().instrumented().canShowActivities() in <lambda>()
660 TestApis.users().instrumented().canShowActivities() in <lambda>()
695 TestApis.users().instrumented().canShowActivities() in <lambda>()
[all …]
DPermissionGrantTest.java177 sTestApp.install(TestApis.users().instrumented()); in setupClass()
245 sTestApp.pkg().grantPermission(TestApis.users().instrumented(), permission); in denyPermission_permissionIsDenied()
258 sTestApp.pkg().denyPermission(TestApis.users().instrumented(), permission); in denyPermission_permissionIsDenied()
268 sTestApp.pkg().denyPermission(TestApis.users().instrumented(), in grantPermission_permissionIsGranted()
280 sTestApp.pkg().denyPermission(TestApis.users().instrumented(), in grantPermission_permissionIsGranted()
290 sTestApp.pkg().grantPermission(TestApis.users().instrumented(), permission); in denyPermission_doesNotApply_permissionIsNotDenied()
299 sTestApp.pkg().denyPermission(TestApis.users().instrumented(), permission); in denyPermission_doesNotApply_permissionIsNotDenied()
311 sTestApp.pkg().denyPermission(TestApis.users().instrumented(), permission); in grantPermission_doesNotApply_permissionIsNotGranted()
320 sTestApp.pkg().denyPermission(TestApis.users().instrumented(), permission); in grantPermission_doesNotApply_permissionIsNotGranted()
658 TestApis.users().instrumented().canShowActivities()); in setPermissionPolicy_grant_automaticallyGrantsPermissions()
[all …]
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/
DDeviceStateTest.java182 assertThat(sDeviceState.workProfile()).isEqualTo(TestApis.users().instrumented()); in workProfile_runningOnWorkProfile_returnsCurrentProfile()
194 assertThat(sDeviceState.tvProfile()).isEqualTo(TestApis.users().instrumented()); in tvProfile_runningOnTvProfile_returnsCurrentProfile()
208 .parent(TestApis.users().instrumented()) in tvProfile_createdTvProfile_throwsException()
220 TestApis.users().instrumented()) in ensureHasTvProfileAnnotation_tvProfileExists()
233 TestApis.users().instrumented()) in ensureHasNoTvProfileAnnotation_tvProfileDoesNotExist()
248 TestApis.users().instrumented()) in ensureHasCloneProfileAnnotation_cloneProfileExists()
257 TestApis.users().instrumented()) in ensureHasNoCloneProfileAnnotation_cloneProfileDoesNotExists()
264 assertThat(sDeviceState.cloneProfile()).isEqualTo(TestApis.users().instrumented()); in cloneProfile_runningOnCloneProfile_returnsCurrentProfile()
270 assertThat(TestApis.users().instrumented().type().name()) in requireRunOnCloneProfileAnnotation_isRunningOnCloneProfile()
285 TestApis.users().instrumented()) in ensureHasPrivateProfileAnnotation_privateProfileExists()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/settings/
DGlobalSettings.kt56 if (user == TestApis.users().instrumented()) { in <lambda>()
100 if (user == TestApis.users().instrumented()) { in <lambda>()
166 return if (user == TestApis.users().instrumented()) { in <lambda>()
183 return if (user == TestApis.users().instrumented()) { in <lambda>()
238 return if (user == TestApis.users().instrumented()) { in <lambda>()
281 if (user == TestApis.users().instrumented()) { in <lambda>()
DSecureSettings.kt56 if (user == TestApis.users().instrumented()) { in putInt()
123 return if (user == TestApis.users().instrumented()) { in getInt()
140 return if (user == TestApis.users().instrumented()) { in getInt()
192 if (user == TestApis.users().instrumented()) { in putString()
260 return if (user == TestApis.users().instrumented()) { in getString()
277 return if (user == TestApis.users().instrumented()) { in getString()
333 if (user == TestApis.users().instrumented()) { in reset()
DSystemSettings.kt56 if (user == TestApis.users().instrumented()) { in putInt()
100 if (user == TestApis.users().instrumented()) { in putString()
166 return if (user == TestApis.users().instrumented()) { in getInt()
183 return if (user == TestApis.users().instrumented()) { in getInt()
238 return if (user == TestApis.users().instrumented()) { in getString()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/content/
DSuggestions.kt43 fun setDefaultServiceEnabled(user: UserReference = TestApis.users().instrumented(), in <lambda>()
62 fun defaultServiceEnabled(user: UserReference = TestApis.users().instrumented()): Boolean { in <lambda>()
89 fun clearTemporaryService(user: UserReference = TestApis.users().instrumented()) { in <lambda>()
/cts/common/device-side/bedstead/testapp/src/testapps/main/java/com/android/bedstead/testapp/
DUtils.java35 if (!TestApis.users().instrumented().canShowActivities()) { in dealWithNoExistingActivityException()
37 + TestApis.users().instrumented() + ") "; in dealWithNoExistingActivityException()
/cts/common/device-side/bedstead/remotedpc/src/main/java/com/android/bedstead/remotedpc/
DRemoteDpc.java86 return profileOwner(TestApis.users().instrumented()); in profileOwner()
133 return any(TestApis.users().instrumented()); in any()
232 return setAsProfileOwner(TestApis.users().instrumented()); in setAsProfileOwner()
239 return setAsProfileOwner(TestApis.users().instrumented(), dpcQuery); in setAsProfileOwner()
299 if (!user.equals(TestApis.users().instrumented())) { in setAsProfileOwner()
329 if (!user.equals(TestApis.users().instrumented())) { in setAsProfileOwner()
373 return createWorkProfile(TestApis.users().instrumented()); in createWorkProfile()
385 return createWorkProfile(TestApis.users().instrumented(), dpcQuery); in createWorkProfile()
/cts/common/device-side/bedstead/modules/multiuser/src/main/kotlin/com/android/bedstead/multiuser/
DAnnotationLogicExtensions.kt53 users().instrumented() == users().main(), in logic()
109 val user = users().instrumented() in logic()
124 val user = users().instrumented() in RequireRunNotOnVisibleBackgroundNonProfileUser()
/cts/common/device-side/bedstead/modules/enterprise/src/main/kotlin/com/android/bedstead/enterprise/
DDeviceOwnerComponent.kt133 val instrumentedUser = users().instrumented() in ensureHasDeviceOwner()
228 val instrumented = users().instrumented() in removeAllNonTestUsers() constant
232 .sorted(Comparator.comparing { u: Any -> (u == instrumented) }.reversed()) in removeAllNonTestUsers()
245 if ((u == instrumented)) { in removeAllNonTestUsers()
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/
DPackageTest.java58 private static final UserReference sUser = TestApis.users().instrumented();
156 pkg.uninstall(TestApis.users().instrumented()); in uninstall_packageIsInstalledForDifferentUser_isUninstalledForUser()
161 pkg.uninstall(TestApis.users().instrumented()); in uninstall_packageIsInstalledForDifferentUser_isUninstalledForUser()
170 pkg.uninstall(TestApis.users().instrumented()); in uninstall_packageIsUninstalled()
172 assertThat(sTestApp.pkg().installedOnUser(TestApis.users().instrumented())).isFalse(); in uninstall_packageIsUninstalled()
250 sTestApp.pkg().uninstall(TestApis.users().instrumented()); in grantPermission_packageIsNotInstalledForUser_throwsException()
359 pkg.uninstall(TestApis.users().instrumented()); in installedOnUsers_doesNotIncludeUserWithoutPackageInstalled()
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/activities/
DActivityReference.java74 return isEnabled(TestApis.users().instrumented()); in isEnabled()
97 return isExported(TestApis.users().instrumented()); in isExported()
/cts/common/device-side/bedstead/modules/permissions/src/main/kotlin/com/android/bedstead/permissions/
DPermissions.java65 TestApis.packages().instrumented();
66 private static final UserReference sUser = TestApis.users().instrumented();
439 TestApis.packages().instrumented(),
440 TestApis.users().instrumented(),
446 TestApis.users().instrumented(),
667 …if (pkg.equals(TestApis.packages().instrumented()) && user.equals(TestApis.users().instrumented())…
679 if (!pkg.equals(TestApis.packages().instrumented()) || !SUPPORTS_ADOPT_SHELL_PERMISSIONS) {
685 if (TestApis.packages().instrumented().isInstantApp()) {

12345