Home
last modified time | relevance | path

Searched refs:secondaryUser (Results 1 – 23 of 23) sorted by relevance

/cts/tests/tests/content/src/android/content/pm/cts/
DPackageManagerShellCommandMultiUserTest.kt160 private lateinit var secondaryUser: UserReference variable in android.content.pm.cts.PackageManagerShellCommandMultiUserTest
165 secondaryUser = deviceState.secondaryUser() in cacheUsers()
227 installExistingPackageAsUser(context.packageName, secondaryUser) in testGetFirstInstallTime()
228 assertTrue(isAppInstalledForUser(context.packageName, secondaryUser)) in testGetFirstInstallTime()
230 installPackageAsUser(TEST_HW5, secondaryUser) in testGetFirstInstallTime()
231 assertTrue(isAppInstalledForUser(TEST_APP_PACKAGE, secondaryUser)) in testGetFirstInstallTime()
236 getFirstInstallTimeAsUser(TEST_APP_PACKAGE, secondaryUser) in testGetFirstInstallTime()
243 uninstallPackageAsUser(TEST_APP_PACKAGE, secondaryUser) in testGetFirstInstallTime()
244 assertFalse(isAppInstalledForUser(TEST_APP_PACKAGE, secondaryUser)) in testGetFirstInstallTime()
247 installExistingPackageAsUser(TEST_APP_PACKAGE, secondaryUser) in testGetFirstInstallTime()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/packages/
DPackageTest.java125 sInstrumentedPackage.installExisting(sDeviceState.secondaryUser()); in installExisting_alreadyInstalled_installsInUser()
128 assertThat(sInstrumentedPackage.installedOnUser(sDeviceState.secondaryUser())).isTrue(); in installExisting_alreadyInstalled_installsInUser()
130 sInstrumentedPackage.uninstall(sDeviceState.secondaryUser()); in installExisting_alreadyInstalled_installsInUser()
139 pkg.installExisting(sDeviceState.secondaryUser()); in uninstallForAllUsers_isUninstalledForAllUsers()
154 pkg.installExisting(sDeviceState.secondaryUser()); in uninstall_packageIsInstalledForDifferentUser_isUninstalledForUser()
159 sDeviceState.secondaryUser()); in uninstall_packageIsInstalledForDifferentUser_isUninstalledForUser()
162 pkg.uninstall(sDeviceState.secondaryUser()); in uninstall_packageIsInstalledForDifferentUser_isUninstalledForUser()
182 sTestApp.pkg().uninstall(sDeviceState.secondaryUser()); in uninstall_packageNotInstalledForUser_doesNotThrowException()
224 TestAppInstance instance2 = sTestApp.install(sDeviceState.secondaryUser())) { in grantPermission_permissionIsUserSpecific_permissionIsGrantedOnlyForThatUser()
226 sTestApp.pkg().grantPermission(sDeviceState.secondaryUser(), USER_SPECIFIC_PERMISSION); in grantPermission_permissionIsUserSpecific_permissionIsGrantedOnlyForThatUser()
[all …]
/cts/hostsidetests/media/src/android/media/router/cts/
DProxyMediaRouter2HostSideTest.java63 private static int secondaryUser = -1; field in ProxyMediaRouter2HostSideTest
69 secondaryUser = device.createUser("TEST_USER", false, false, true); in installApps()
71 installTestAppAsUser(testInformation, MEDIA_ROUTER_PROVIDER_1_APK, secondaryUser); in installApps()
73 testInformation, MEDIA_ROUTER_SECONDARY_USER_HELPER_APK, secondaryUser); in installApps()
74 assertThat(secondaryUser).isNotEqualTo(-1); in installApps()
75 assertThat(secondaryUser).isNotEqualTo(device.getCurrentUser()); in installApps()
102 MEDIA_ROUTER_SECONDARY_USER_HELPER_PACKAGE, secondaryUser)) in uninstallApps()
108 assertThat(device.removeUser(secondaryUser)).isTrue(); in uninstallApps()
157 .addInstrumentationArg(TARGET_USER_ID_KEY, String.valueOf(secondaryUser)); in getInstance_acrossUsers_withInteractAcrossUsersFull_returnsInstance()
241 .addInstrumentationArg(TARGET_USER_ID_KEY, String.valueOf(secondaryUser)); in getInstance_acrossUsers_withoutInteractAcrossUsersFull_throwsSecurityException()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/settings/
DGlobalSettingsTest.kt83 TestApis.settings().global().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
86 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>()
97 TestApis.settings().global().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
172 TestApis.settings().global().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
174 deviceState.secondaryUser(), KEY)).isEqualTo(INT_VALUE) in <lambda>()
182 TestApis.settings().global().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
227 TestApis.settings().global().putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
230 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>()
241 TestApis.settings().global().putString(deviceState.secondaryUser(), KEY, in <lambda>()
276 TestApis.settings().global().putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
[all …]
DSystemSettingsTest.kt79 TestApis.settings().system().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
83 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>()
94 TestApis.settings().system().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
169 TestApis.settings().system().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
170 assertThat(TestApis.settings().system().getInt(deviceState.secondaryUser(), KEY)) in <lambda>()
179 TestApis.settings().system().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
224 TestApis.settings().system().putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
227 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>()
239 TestApis.settings().system().putString(deviceState.secondaryUser(), KEY, in <lambda>()
272 TestApis.settings().system().putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
[all …]
DSecureSettingsTest.kt86 TestApis.settings().secure().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
90 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>()
101 TestApis.settings().secure().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
185 TestApis.settings().secure().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
186 Truth.assertThat(TestApis.settings().secure().getInt(deviceState.secondaryUser(), KEY)) in <lambda>()
195 TestApis.settings().secure().putInt(deviceState.secondaryUser(), KEY, INT_VALUE) in <lambda>()
238 TestApis.settings().secure().putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
241 TestApis.context().androidContextAsUser(deviceState.secondaryUser()) in <lambda>()
253 .putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
334 TestApis.settings().secure().putString(deviceState.secondaryUser(), KEY, STRING_VALUE) in <lambda>()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DResumeOnRebootHostTest.java180 int secondaryUser = users[1]; in resumeOnReboot_TwoUsers_SingleUserUnlock_Success() local
186 switchUser(secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
187 deviceSetup(secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
200 getDevice().startUser(secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
205 switchUser(secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
206 runDeviceTestsAsUser("testVerifyLockedAndDismiss", secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
209 switchUser(secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
210 runDeviceTestsAsUser("testTearDown", secondaryUser); in resumeOnReboot_TwoUsers_SingleUserUnlock_Success()
230 int secondaryUser = users[1]; in resumeOnReboot_TwoUsers_BothUserUnlock_Success() local
235 switchUser(secondaryUser); in resumeOnReboot_TwoUsers_BothUserUnlock_Success()
[all …]
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DInstallSourceInfoMultiUserTest.kt47 private lateinit var secondaryUser: UserReference variable in android.packageinstaller.install.cts.InstallSourceInfoMultiUserTest
52 secondaryUser = deviceState.secondaryUser() in setUp()
72 installOnUserAndCheckInfo(secondaryUser) in installOnSecondaryUser()
DUpdateOwnershipEnforcementMultiUserTest.kt51 otherUser = deviceState.secondaryUser() in cacheUsers()
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/users/
DUserInfoStatsTests.java115 UserInfo secondaryUser = findUserById(data, userId); in testSecondaryUserExists() local
116 assertThat(secondaryUser).isNotNull(); in testSecondaryUserExists()
117 assertThat(secondaryUser.getUserType().toString()).isEqualTo("FULL_SECONDARY"); in testSecondaryUserExists()
118 assertThat(secondaryUser.getIsUserRunningUnlocked()).isFalse(); in testSecondaryUserExists()
/cts/common/device-side/bedstead/modules/multiuser/src/test/kotlin/com/android/bedstead/multiuser/
DUsersTest.kt401 .containsExactly(sDeviceState.secondaryUser(), additionalUser) in <lambda>()
534 assertThat(TestApis.users().current()).isEqualTo(sDeviceState.secondaryUser()) in <lambda>()
550 sDeviceState.secondaryUser().switchTo() in <lambda>()
554 sDeviceState.secondaryUser().isRunning() in <lambda>()
560 assertThat(sDeviceState.secondaryUser().isRunning()).isFalse() in <lambda>()
562 sDeviceState.secondaryUser().start() in <lambda>()
573 assertThat(sDeviceState.secondaryUser().isRunning()).isTrue() in <lambda>()
576 sDeviceState.secondaryUser().start() in <lambda>()
577 sDeviceState.secondaryUser().switchTo() in <lambda>()
DUserReferenceTest.java105 assertThat(sDeviceState.secondaryUser().exists()).isTrue(); in exists_doesExist_returnsTrue()
145 sDeviceState.secondaryUser().start(); in start_userAlreadyStarted_doesNothing()
147 sDeviceState.secondaryUser().start(); in start_userAlreadyStarted_doesNothing()
149 assertThat(sDeviceState.secondaryUser().isUnlocked()).isTrue(); in start_userAlreadyStarted_doesNothing()
211 sDeviceState.secondaryUser().stop(); in stop_userStarted_userIsStopped()
213 assertThat(sDeviceState.secondaryUser().isRunning()).isFalse(); in stop_userStarted_userIsStopped()
220 sDeviceState.secondaryUser().stop(); in stop_userNotStarted_doesNothing()
222 sDeviceState.secondaryUser().stop(); in stop_userNotStarted_doesNothing()
224 assertThat(sDeviceState.secondaryUser().isRunning()).isFalse(); in stop_userNotStarted_doesNothing()
232 sDeviceState.secondaryUser().switchTo(); in switchTo_userIsSwitched()
[all …]
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/devicepolicy/
DProfileOwnerTest.java138 TestApis.devicePolicy().getProfileOwner(sDeviceState.secondaryUser()).remove(); in remove_onOtherUser_removesProfileOwner()
140 assertThat(TestApis.devicePolicy().getProfileOwner(sDeviceState.secondaryUser())) in remove_onOtherUser_removesProfileOwner()
/cts/common/device-side/bedstead/modules/multiuser/src/main/kotlin/com/android/bedstead/multiuser/
DUsersComponent.kt303 for (secondaryUser: UserReference in users().findUsersOfType(resolvedUserType)) { in <lambda>() constant
304 if (secondaryUser == users().instrumented()) { in <lambda>()
310 removeAndRecordUser(secondaryUser) in <lambda>()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DStartProfilesTest.java208 () -> sActivityManager.startProfile(sDeviceState.secondaryUser().userHandle())); in startProfile_startingFullUser_throwsException()
218 () -> sActivityManager.stopProfile(sDeviceState.secondaryUser().userHandle())); in stopProfile_stoppingFullUser_throwsException()
DNearbyAppStreamingPolicyTest.java155 .instrumentedContextAsUser(sDeviceState.secondaryUser()) in getNearbyAppStreamingPolicy_calledAcrossUsers_throwsException()
DNearbyNotificationStreamingPolicyTest.java154 .instrumentedContextAsUser(sDeviceState.secondaryUser()) in getNearbyNotificationStreamingPolicy_calledAcrossUsers_throwsException()
DProvisioningTest.kt1296 val dpc = RemoteDpc.setAsProfileOwner(deviceState.secondaryUser()) in <lambda>()
1300 deviceState.secondaryUser().userHandle(), /* migratedAccount= */ in <lambda>()
/cts/common/device-side/bedstead/harrier/src/test/java/com/android/bedstead/harrier/
DDeviceStateTest.java314 assertThat(sDeviceState.secondaryUser()).isNotNull(); in secondaryUser_secondaryUserProvided_returnsSecondaryUser()
326 assertThat(sDeviceState.secondaryUser()).isEqualTo(TestApis.users().instrumented()); in secondaryUser_runningOnSecondaryUser_returnsCurrentUser()
333 assertThrows(IllegalStateException.class, sDeviceState::secondaryUser); in secondaryUser_noSecondaryUser_throwsException()
340 try (UserReference secondaryUser = TestApis.users().createUser() in secondaryUser_createdSecondaryUser_throwsException() argument
343 assertThrows(IllegalStateException.class, sDeviceState::secondaryUser); in secondaryUser_createdSecondaryUser_throwsException()
668 assertThat(sDeviceState.otherUser()).isEqualTo(sDeviceState.secondaryUser()); in otherUserAnnotation_otherUserReturnsCorrectType()
727 .installedOnUser(sDeviceState.secondaryUser())).isTrue(); in ensureTestAppInstalledAnnotation_testAppIsInstalledOnCorrectUser()
/cts/common/device-side/bedstead/modules/enterprise/src/test/kotlin/com/android/bedstead/enterprise/
DEnterpriseAnnotationExecutorTest.kt268 assertThat(devicePolicy().getProfileOwner(sDeviceState.secondaryUser())).isNotNull() in ensureHasProfileOwnerAnnotation_otherUser_setsProfileOwner()
275 assertThat(devicePolicy().getProfileOwner(sDeviceState.secondaryUser())).isNull() in ensureHasNoProfileOwnerAnnotation_otherUser_profileOwnerIsNotSet()
296 assertThat(sDeviceState.profileOwner(sDeviceState.secondaryUser())).isNotNull() in profileOwner_otherUser_profileOwnerIsSet_returnsProfileOwner()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DCommandReceiverActivity.java567 for (UserHandle secondaryUser : mDpm.getSecondaryUsers(mAdmin)) { in onCreate()
568 mDpm.removeUser(mAdmin, secondaryUser); in onCreate()
/cts/tests/tests/appenumeration/src/android/appenumeration/cts/
DCrossUserPackageVisibilityTests.java102 mOtherUser = sDeviceState.secondaryUser(); in setup()
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/
DDeviceState.java1458 public UserReference secondaryUser() {
1735 return secondaryUser();