Home
last modified time | relevance | path

Searched refs:otherUser (Results 1 – 12 of 12) sorted by relevance

/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DCrossProfileAppsTest.java154 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in getTargetUserProfiles_doesNotContainOtherUser()
158 assertThat(targetProfiles).doesNotContain(sDeviceState.otherUser().userHandle()); in getTargetUserProfiles_doesNotContainOtherUser()
166 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in getTargetUserProfiles_containsOtherUser()
170 assertThat(targetProfiles).contains(sDeviceState.otherUser().userHandle()); in getTargetUserProfiles_containsOtherUser()
179 TestApis.packages().instrumented().uninstall(sDeviceState.otherUser()); in getTargetUserProfiles_appNotInstalledInOtherUser_doesNotContainOtherUser()
183 assertThat(targetProfiles).doesNotContain(sDeviceState.otherUser().userHandle()); in getTargetUserProfiles_appNotInstalledInOtherUser_doesNotContainOtherUser()
212 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isProfile_targetIsInvalid_throwsSecurityException()
215 sCrossProfileApps.isProfile(sDeviceState.otherUser().userHandle()); in isProfile_targetIsInvalid_throwsSecurityException()
230 TestApis.packages().instrumented().installExisting(sDeviceState.otherUser()); in isProfile_profile_returnsTrue()
232 assertThat(sCrossProfileApps.isProfile(sDeviceState.otherUser().userHandle())).isTrue(); in isProfile_profile_returnsTrue()
[all …]
DCrossProfileIntentFiltersTest.java91 try (TestAppInstance testApp = sTestApp.install(sDeviceState.otherUser())) { in queryIntentActivities_doesntIncludeAppInOtherUser()
105 try (TestAppInstance testApp = sTestApp.install(sDeviceState.otherUser())) { in queryIntentActivities_intentFilterIsSet_includesAppInOtherUser()
161 try (TestAppInstance testApp = sTestApp.install(sDeviceState.otherUser())) { in startActivity_intentFilterIsSet_startsAppInOtherUser()
222 TestAppInstance testApp = sTestApp.install(sDeviceState.otherUser())) { in addCrossProfileIntentFilter_logsMetric()
248 try (TestAppInstance testApp = sTestApp.install(sDeviceState.otherUser())) { in clearCrossProfileIntentFilters_clears()
274 TestAppInstance otherTestApp = sTestApp.install(sDeviceState.otherUser())) { in queryIntentActivities_intentFilterIsSet_includesAppInBothUsers()
306 TestAppInstance otherTestApp = sTestApp.install(sDeviceState.otherUser())) { in startActivity_intentFilterIsSet_appIsInBothUsers_requiresDisambiguation()
/cts/tests/tests/multiuser/src/android/multiuser/cts/
DUserVisibilityVisibleBackgroundUsersOnDefaultDisplayTest.java103 UserReference otherUser = users().createUser().name("other_user").create(); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_thereCanBeOnlyOne() local
104 assertWithMessage("other user").that(otherUser.id()).isNotEqualTo(user.id()); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_thereCanBeOnlyOne()
106 boolean started = tryToStartVisibleBackgroundUser(otherUser.id(), DEFAULT_DISPLAY); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_thereCanBeOnlyOne()
109 otherUser, user).that(started).isFalse(); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_thereCanBeOnlyOne()
DUserVisibilityVisibleBackgroundUsersTestCase.java295 try (UserReference otherUser = TestApis.users().createUser().name("other_user") in testStartVisibleBgUser_onSecondaryDisplay_displayInUse() argument
297 int otherUserId = otherUser.id(); in testStartVisibleBgUser_onSecondaryDisplay_displayInUse()
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DUpdateOwnershipEnforcementMultiUserTest.kt37 private lateinit var otherUser: UserReference variable in android.packageinstaller.install.cts.UpdateOwnershipEnforcementMultiUserTest
51 otherUser = deviceState.secondaryUser() in cacheUsers()
54 otherUser = primaryUser in cacheUsers()
/cts/common/device-side/bedstead/modules/multiuser/src/main/kotlin/com/android/bedstead/multiuser/
DUsersComponent.kt90 for (otherUser in users) { in <lambda>() method
91 if (otherUser == user) { in <lambda>()
94 if (otherUser.parent() != null) { in <lambda>()
97 if (!otherUser.isRunning()) { in <lambda>()
100 if (!otherUser.canBeSwitchedTo()) { in <lambda>()
103 switchToUser(otherUser) in <lambda>()
528 fun otherUser(): UserReference { in <lambda>() method in com.android.bedstead.multiuser.UsersComponent
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/
DBedsteadJUnit4Test.java241 assertThat(sDeviceState.otherUser()).isEqualTo(sDeviceState.workProfile()); in crossUserTestAnnotation_isRunningWithCorrectUserPairs()
244 assertThat(sDeviceState.otherUser()).isEqualTo(sDeviceState.initialUser()); in crossUserTestAnnotation_isRunningWithCorrectUserPairs()
DDeviceStateTest.java668 assertThat(sDeviceState.otherUser()).isEqualTo(sDeviceState.secondaryUser()); in otherUserAnnotation_otherUserReturnsCorrectType()
673 assertThrows(IllegalStateException.class, () -> sDeviceState.otherUser()); in otherUser_noOtherUserSpecified_throwsException()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DAppDataIsolationTests.java379 private Map<String, String> makeOtherUserIdArgs(int otherUser) { in makeOtherUserIdArgs() argument
381 args.put("other_user_id", Integer.toString(otherUser)); in makeOtherUserIdArgs()
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/
DBedsteadJUnit4.java199 private static OtherUser otherUser(UserType value) { in otherUser() method in BedsteadJUnit4
1088 otherUser(userPair.to()) in generateCrossUserAnnotations()
DDeviceState.java1467 public UserReference otherUser() {
1468 return mUsersComponent.otherUser();
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageStatsTest.java1291 final UserHandle otherUser = UserHandle.of(userId); in testCrossUserQuery_withPermission() local
1292 final Context userContext = mContext.createContextAsUser(otherUser, 0); in testCrossUserQuery_withPermission()