/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/users/ |
D | Users.java | 90 private Map<Integer, UserReference> mUsers = new ConcurrentHashMap<>(); 99 public Collection<UserReference> all() { in all() 102 return mCachedUsers.keySet().stream().map(UserReference::new) in all() 113 public Collection<UserReference> profileGroup() { in profileGroup() 119 public Collection<UserReference> profileGroup(UserReference user) { in profileGroup() 129 public UserReference initial() { in initial() 135 UserReference user = in initial() 150 List<UserReference> users = new ArrayList<>(all()); in initial() 151 users.sort(Comparator.comparingInt(UserReference::id)); in initial() 153 for (UserReference user : users) { in initial() [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/accounts/ |
D | AccountManager.java | 21 import com.android.bedstead.nene.users.UserReference; 29 private final UserReference mUser; 34 UserReference user, E accountManagerInstance, RemoteAccountManager accountManager) { in AccountManager() 51 UserReference user() { in user()
|
D | AccountReference.java | 34 import com.android.bedstead.nene.users.UserReference; 46 private final UserReference mUser; 55 public static AccountReference of(UserReference user, Account androidAccount) { in of() 65 UserReference user, Account androidAccount, Consumer<AccountReference> removeFunction) { in of() 74 public static AccountReference fromAddResult(UserReference user, Bundle result) { in fromAddResult() 87 UserReference user, Bundle result, Consumer<AccountReference> removeFunction) { in fromAddResult() 95 UserReference user, Account androidAccount, Consumer<AccountReference> removeFunction) { in AccountReference() 101 AccountReference(UserReference user, Account androidAccount) { in AccountReference() 146 public UserReference user() { in user()
|
D | Accounts.java | 29 import com.android.bedstead.nene.users.UserReference; 50 …roid.bedstead.nene.accounts.AccountManager<RemoteAccountManager> wrap(UserReference user, RemoteAc… in wrap() 90 public Set<AccountReference> all(UserReference user) { in all() 109 public Set<AccountReference> getByType(UserReference user, String type) { in getByType() 118 private AccountManager accountManager(UserReference user) { in accountManager()
|
/cts/common/device-side/bedstead/modules/multiuser/src/main/kotlin/com/android/bedstead/multiuser/ |
D | UsersComponent.kt | 33 import com.android.bedstead.nene.users.UserReference in <lambda>() 49 private val createdUsers: MutableList<UserReference> = mutableListOf() in <lambda>() 51 private var mOriginalSwitchedUser: UserReference? = null in <lambda>() 52 private var mAdditionalUser: UserReference? = null in <lambda>() 54 private val mUsers: MutableMap<UserType, UserReference> = HashMap() in <lambda>() 55 private val mUsersSetPasswords: MutableList<UserReference> = mutableListOf() in <lambda>() 61 fun removeAndRecordUser(userReference: UserReference?) { in <lambda>() 81 private fun switchFromUser(user: UserReference) { in <lambda>() 115 private fun switchToUser(user: UserReference) { in <lambda>() 128 fun ensureSwitchedToUser(switchedToUser: OptionalBoolean, user: UserReference) { in <lambda>() [all …]
|
/cts/common/device-side/bedstead/modules/multiuser/src/test/kotlin/com/android/bedstead/multiuser/ |
D | UserReferenceTest.java | 54 import com.android.bedstead.nene.users.UserReference; 84 assertThat(UserReference.of(USER_HANDLE).id()).isEqualTo(USER_ID); in of_returnsUserReferenceWithValidId() 111 UserReference user = sDeviceState.additionalUser(); in remove_userExists_removesUser() 156 UserReference user = sDeviceState.additionalUser().stop(); in start_onDisplay_notSupported_throwsException() 169 UserReference user = sDeviceState.additionalUser().stop(); in start_onDisplay_success() 187 UserReference user = sDeviceState.additionalUser().stop(); in start_onDisplay_userAlreadyStarted_doesNothing() 256 UserReference user = TestApis.users().instrumented(); in serialNo_returnsSerialNo() 264 UserReference user = TestApis.users().find(NON_EXISTING_USER_ID); in serialNo_userDoesNotExist_throwsException() 273 UserReference user = TestApis.users().instrumented(); in name_returnsName() 280 UserReference user = TestApis.users().find(NON_EXISTING_USER_ID); in name_userDoesNotExist_throwsException() [all …]
|
/cts/tests/devicepolicy/src/android/devicepolicy/cts/ |
D | CreateAndManageUserTest.java | 42 import com.android.bedstead.nene.users.UserReference; 67 try (UserReference user = UserReference.of(sDeviceState.dpc().devicePolicyManager() in createAndManageUser_userExists() 100 try (UserReference user = UserReference.of(sDeviceState.dpc().devicePolicyManager() in createAndManageUser_newUserDisclaimerIsNotAcknowledged() 125 try (UserReference user = UserReference.of(sDeviceState.dpc().devicePolicyManager() in acknowledgeNewUserDisclaimer_newUserDisclaimerIsAcknowledged() 145 UserReference instrumented = TestApis.users().instrumented(); in createAndManageUser_switchToUser_showsDisclaimer() 146 try (UserReference user = UserReference.of(sDeviceState.dpc().devicePolicyManager() in createAndManageUser_switchToUser_showsDisclaimer()
|
D | CloneProfileTest.java | 39 import com.android.bedstead.nene.users.UserReference; 76 try (UserReference cloneUser = createCloneProfile()) { in createCloneProfile_noDeviceOwner_succeeds() 88 try (UserReference cloneProfile = createCloneProfile()) { in createCloneProfile_deviceHasWorkProfile_succeeds() 100 try (UserReference cloneProfile = createCloneProfile()) { in createCloneProfile_deviceHasOrganizationOwnedWorkProfile_succeeds() 105 private UserReference createCloneProfile() { in createCloneProfile()
|
D | DevicePolicyManagementRoleHolderTest.java | 56 import com.android.bedstead.nene.users.UserReference; 98 try (UserReference profile = UserReference.of( in createAndProvisionManagedProfile_roleHolderIsInWorkProfile() 117 try (UserReference userReference = UserReference.of( in createAndManageUser_roleHolderIsInManagedUser() 156 try (UserReference profile = UserReference.of( in profileEntersQuietMode_roleHolderReceivesBroadcast() 174 try (UserReference profile = UserReference.of( in profileStarted_roleHolderReceivesBroadcast() 213 try (UserReference user = TestApis.users().createUser() in shouldAllowBypassingDevicePolicyManagementRoleQualification_withNonTestUsers_returnsFalse() 234 try (UserReference user = TestApis.users().createUser() in shouldAllowBypassingDevicePolicyManagementRoleQualification_withTestUsers_returnsTrue()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/devicepolicy/ |
D | DevicePolicy.kt | 39 import com.android.bedstead.nene.users.UserReference in <lambda>() 61 private var mCachedProfileOwners: Map<UserReference, ProfileOwner>? = null in <lambda>() 66 fun setProfileOwner(user: UserReference, profileOwnerComponent: ComponentName): ProfileOwner { in <lambda>() 131 return getProfileOwner(UserReference.of(user)) in <lambda>() 138 fun getProfileOwner(user: UserReference = TestApis.users().instrumented()): ProfileOwner? { in <lambda>() 150 user: UserReference = TestApis.users().system() in <lambda>() 252 fun clearOrganizationId(user: UserReference = TestApis.users().instrumented()) { in <lambda>() 293 private fun devicePolicyManager(user: UserReference): DevicePolicyManager = in <lambda>() 389 user: UserReference, in <lambda>() 428 user: UserReference in <lambda>() [all …]
|
D | DevicePolicyController.java | 23 import com.android.bedstead.nene.users.UserReference; 32 protected final UserReference mUser; 36 DevicePolicyController(UserReference user, Package pkg, ComponentName componentName) { in DevicePolicyController() 49 public UserReference user() { in user()
|
D | UserRestrictions.java | 27 import com.android.bedstead.nene.users.UserReference; 35 private final UserReference mUser; 39 UserRestrictions(UserReference user) { in UserRestrictions()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/context/ |
D | Context.java | 25 import com.android.bedstead.nene.users.UserReference; 54 public android.content.Context instrumentedContextAsUser(UserReference user) { in instrumentedContextAsUser() 69 public android.content.Context instrumentationContextAsUser(UserReference user) { in instrumentationContextAsUser() 78 public android.content.Context androidContextAsUser(UserReference user) { in androidContextAsUser()
|
/cts/tests/tests/multiuser/src/android/multiuser/cts/ |
D | UserVisibilityVisibleBackgroundUsersOnDefaultDisplayTest.java | 31 import com.android.bedstead.nene.users.UserReference; 74 UserReference user = sDeviceState.additionalUser(); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay() 85 UserReference currentUser = users().current(); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_currentUser() 96 UserReference user = sDeviceState.additionalUser(); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_thereCanBeOnlyOne() 103 UserReference otherUser = users().createUser().name("other_user").create(); in testStartUserInBackgroundOnSecondaryDisplay_defaultDisplay_thereCanBeOnlyOne()
|
D | UserVisibilityTestCase.java | 38 import com.android.bedstead.nene.users.UserReference; 113 try (UserReference user = TestApis.users().createUser().name("childless_user").create()) { in runTestOnDisplay() 135 try (UserReference user = TestApis.users().createUser().name("parent_user").create()) { in runTestOnSecondaryDisplay() 137 try (UserReference profile = TestApis.users().createUser() in runTestOnSecondaryDisplay() 163 void run(UserReference user, int displayId, TestAppInstance instance); in run() 167 void run(UserReference user, UserReference profile, int displayId, in run() 172 void run(UserReference user, TestAppInstance instance); in run() 204 protected void startVisibleBackgroundUser(UserReference user, int displayId) { in startVisibleBackgroundUser()
|
D | UserVisibilityVisibleBackgroundUsersTestCase.java | 41 import com.android.bedstead.nene.users.UserReference; 143 try (UserReference parent = TestApis.users().createUser().name("parent_user").create()) { in testStartVisibleBgUser_onSecondaryDisplay_profileOnSameDisplay() 145 try (UserReference profile = TestApis.users().createUser() in testStartVisibleBgUser_onSecondaryDisplay_profileOnSameDisplay() 178 try (UserReference parent = TestApis.users().createUser().name("parent_user").create()) { in testStartVisibleBgUser_onSecondaryDisplay_profileOnDefaultDisplay() 180 try (UserReference profile = TestApis.users().createUser() in testStartVisibleBgUser_onSecondaryDisplay_profileOnDefaultDisplay() 216 UserReference systemUser = TestApis.users().system(); in testStartVisibleBgUser_parentOnDefaultDisplayProfileOnSecondaryDisplay() 218 try (UserReference profile = TestApis.users().createUser() in testStartVisibleBgUser_parentOnDefaultDisplayProfileOnSecondaryDisplay() 242 UserReference profile = sDeviceState.workProfile(); in testStartVisibleBgUser_parentOnDefaultDisplayProfileOnSecondaryDisplay() 264 try (UserReference user = TestApis.users().createUser().name("parent_user").create()) { in testStartVisibleBgUser_parentOnDefaultDisplayProfileOnSecondaryDisplay_HSUM() 267 try (UserReference profile = TestApis.users().createUser() in testStartVisibleBgUser_parentOnDefaultDisplayProfileOnSecondaryDisplay_HSUM() [all …]
|
/cts/common/device-side/bedstead/modules/enterprise/src/main/kotlin/com/android/bedstead/enterprise/ |
D | ProfileOwnersComponent.kt | 28 import com.android.bedstead.nene.users.UserReference in <lambda>() 46 private val profileOwners: MutableMap<UserReference, DevicePolicyController?> = HashMap() in <lambda>() 47 private val changedProfileOwners: MutableMap<UserReference, DevicePolicyController?> = HashMap() in <lambda>() 52 fun getExistingProfileOwner(user: UserReference) = profileOwners[user] in <lambda>() 68 val user: UserReference = deviceState.resolveUserTypeToUser(onUser) in <lambda>() 85 user: UserReference, in <lambda>() 172 fun ensureHasNoProfileOwner(user: UserReference) { in <lambda>() 197 fun profileOwner(onUser: UserReference): RemoteDpc { in <lambda>()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/packages/ |
D | Package.java | 72 import com.android.bedstead.nene.users.UserReference; 132 public Package installExisting(UserReference user) { in installExisting() 155 public Package install(UserReference user, File apkFile) { in install() 168 public Package install(UserReference user, Supplier<File> apkFile) { in install() 181 public Package installBytes(UserReference user, byte[] apkFile) { in installBytes() 195 public Package installBytes(UserReference user, Supplier<byte[]> apkFile) { in installBytes() 209 for (UserReference user : installedOnUsers()) { in uninstallFromAllUsers() 222 public Package uninstall(UserReference user) { in uninstall() 309 public Package enable(UserReference user) { in enable() 334 public Package disable(UserReference user) { in disable() [all …]
|
D | AdbPackage.java | 25 import com.android.bedstead.nene.users.UserReference; 42 Map<UserReference, MutableUserPackage> mInstalledOnUsers; 76 public Set<UserReference> installedOnUsers() { in installedOnUsers() 85 public Set<String> grantedPermissions(UserReference user) { in grantedPermissions()
|
D | ProcessReference.java | 21 import com.android.bedstead.nene.users.UserReference; 33 private final UserReference mUser; 35 ProcessReference(Package pkg, int pid, int uid, UserReference user) { in ProcessReference() 69 public UserReference user() { in user()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/content/ |
D | Suggestions.kt | 24 import com.android.bedstead.nene.users.UserReference in <lambda>() 43 fun setDefaultServiceEnabled(user: UserReference = TestApis.users().instrumented(), in <lambda>() 62 fun defaultServiceEnabled(user: UserReference = TestApis.users().instrumented()): Boolean { in <lambda>() 75 fun setTemporaryService(user: UserReference, component: ComponentReference): UndoableContext { in <lambda>() 89 fun clearTemporaryService(user: UserReference = TestApis.users().instrumented()) { in <lambda>()
|
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/ |
D | DeviceState.java | 126 import com.android.bedstead.nene.users.UserReference; 827 UserReference user = 1108 UserReference instrumentedUser = TestApis.users().instrumented(); 1174 private final Map<com.android.bedstead.nene.users.UserType, Map<UserReference, UserReference>> 1177 … private final Map<UserReference, Set<String>> mAddedUserRestrictions = new ConcurrentHashMap<>(); 1178 …private final Map<UserReference, Set<String>> mRemovedUserRestrictions = new ConcurrentHashMap<>(); 1193 private final Map<UserReference, Boolean> mOriginalDefaultContentSuggestionsServiceEnabled = 1195 private final Set<UserReference> mTemporaryContentSuggestionsServiceSet = 1197 private final Map<UserReference, Map<String, String>> mOriginalSecureSettings = new HashMap<>(); 1200 private final Map<UserReference, RemoteAccountAuthenticator> mAccountAuthenticators = [all …]
|
/cts/common/device-side/bedstead/remotedpc/src/test/java/com/android/bedstead/remotedpc/ |
D | RemoteDpcTest.java | 46 import com.android.bedstead.nene.users.UserReference; 71 private static final UserReference sUser = TestApis.users().instrumented(); 72 private static final UserReference NON_EXISTING_USER_REFERENCE = 151 UserReference profile = TestApis.users().createUser() in profileOwner_userHandle_noProfileOwner_returnsNull() 168 UserReference profile = TestApis.users().createUser() in profileOwner_userHandle_nonRemoteDpcProfileOwner_returnsNull() 188 UserReference profile = TestApis.users().createUser() in profileOwner_userHandle_remoteDpcProfileOwner_returnsInstance() 203 () -> RemoteDpc.profileOwner((UserReference) null)); in profileOwner_userReference_null_throwsException() 211 UserReference profile = TestApis.users().createUser() in profileOwner_userReference_noProfileOwner_returnsNull() 227 UserReference profile = TestApis.users().createUser() in profileOwner_userReference_nonRemoteDpcProfileOwner_returnsNull() 247 UserReference profile = TestApis.users().createUser() in profileOwner_userReference_remoteDpcProfileOwner_returnsInstance() [all …]
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | LauncherAppsForHiddenProfilesTest.java | 59 import com.android.bedstead.nene.users.UserReference; 118 try (UserReference privateProfile = createProfileAndSetupTestState(); in testGeneralApis_notDefaultLauncherWithNormalPerm_hiddenProfileInfoStripped() 134 try (UserReference privateProfile = createProfileAndSetupTestState(); in testGeneralApis_defaultLauncherNoPerms_hiddenProfileInfoStripped() 153 try (UserReference privateProfile = createProfileAndSetupTestState(); in testGeneralApis_withSystemPerm_hiddenProfileInfoAvailable() 169 try (UserReference privateProfile = createProfileAndSetupTestState(); in testGeneralApis_defaultLauncherWithNormalPerm_hiddenProfileInfoAvailable() 187 try (UserReference privateProfile = createProfileAndSetupTestState()) { in testGetProfiles_calledFromProfile_returnsOnlyCurrentProfile() 207 try (UserReference privateProfile = createProfile(); in testAppChangesCallbacks_defaultLauncherWithNormalPerm_callbacksReceived() 227 try (UserReference privateProfile = createProfile(); in testAppChangesCallbacks_notDefaultLauncherWithNormalPerm_callbacksNotReceived() 235 private void assertCallbacksPropagation(UserReference targetUser, boolean received) { in assertCallbacksPropagation() 253 private void triggerCallbacks(UserReference reference) { in triggerCallbacks() [all …]
|
/cts/tests/tests/appenumeration/src/android/appenumeration/cts/ |
D | Utils.java | 35 import com.android.bedstead.nene.users.UserReference; 92 static void installPackageForUser(String apkPath, UserReference user) { in installPackageForUser() 99 private static void installPackageForUser(String apkPath, UserReference user, in installPackageForUser() 117 static void installExistPackageForUser(String apkPath, UserReference user) { in installExistPackageForUser() 138 static void uninstallPackageForUser(String packageName, UserReference user) { in uninstallPackageForUser() 158 static void forceStopPackageForUser(String packageName, UserReference user) { in forceStopPackageForUser() 171 static void clearAppDataForUser(String packageName, UserReference user) { in clearAppDataForUser() 185 suspendPackagesForUser(suspend, packages, UserReference.of(getContext().getUser()), in suspendPackages() 193 UserReference user, boolean extraPersistableBundle) { in suspendPackagesForUser()
|