/cts/tests/tests/content/src/android/content/pm/cts/ |
D | PackageManagerShellCommandMultiUserTest.kt | 160 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/ |
D | PackageTest.java | 125 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/ |
D | ProxyMediaRouter2HostSideTest.java | 63 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/ |
D | GlobalSettingsTest.kt | 83 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 …]
|
D | SystemSettingsTest.kt | 79 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 …]
|
D | SecureSettingsTest.kt | 86 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/ |
D | ResumeOnRebootHostTest.java | 180 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/ |
D | InstallSourceInfoMultiUserTest.kt | 47 private lateinit var secondaryUser: UserReference variable in android.packageinstaller.install.cts.InstallSourceInfoMultiUserTest 52 secondaryUser = deviceState.secondaryUser() in setUp() 72 installOnUserAndCheckInfo(secondaryUser) in installOnSecondaryUser()
|
D | UpdateOwnershipEnforcementMultiUserTest.kt | 51 otherUser = deviceState.secondaryUser() in cacheUsers()
|
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/users/ |
D | UserInfoStatsTests.java | 115 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/ |
D | UsersTest.kt | 401 .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>()
|
D | UserReferenceTest.java | 105 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/ |
D | ProfileOwnerTest.java | 138 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/ |
D | UsersComponent.kt | 303 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/ |
D | StartProfilesTest.java | 208 () -> sActivityManager.startProfile(sDeviceState.secondaryUser().userHandle())); in startProfile_startingFullUser_throwsException() 218 () -> sActivityManager.stopProfile(sDeviceState.secondaryUser().userHandle())); in stopProfile_stoppingFullUser_throwsException()
|
D | NearbyAppStreamingPolicyTest.java | 155 .instrumentedContextAsUser(sDeviceState.secondaryUser()) in getNearbyAppStreamingPolicy_calledAcrossUsers_throwsException()
|
D | NearbyNotificationStreamingPolicyTest.java | 154 .instrumentedContextAsUser(sDeviceState.secondaryUser()) in getNearbyNotificationStreamingPolicy_calledAcrossUsers_throwsException()
|
D | ProvisioningTest.kt | 1296 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/ |
D | DeviceStateTest.java | 314 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/ |
D | EnterpriseAnnotationExecutorTest.kt | 268 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/ |
D | CommandReceiverActivity.java | 567 for (UserHandle secondaryUser : mDpm.getSecondaryUsers(mAdmin)) { in onCreate() 568 mDpm.removeUser(mAdmin, secondaryUser); in onCreate()
|
/cts/tests/tests/appenumeration/src/android/appenumeration/cts/ |
D | CrossUserPackageVisibilityTests.java | 102 mOtherUser = sDeviceState.secondaryUser(); in setup()
|
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/ |
D | DeviceState.java | 1458 public UserReference secondaryUser() { 1735 return secondaryUser();
|