/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserManagerTest.java | 24 import android.content.pm.UserInfo; 105 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers() 106 for (UserInfo user : list) { in removeExistingUsers() 124 UserInfo userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testAddUser() 127 List<UserInfo> list = mUserManager.getUsers(); in testAddUser() 129 for (UserInfo user : list) { in testAddUser() 145 UserInfo user1 = createUser("Guest 1", UserInfo.FLAG_GUEST); in testAdd2Users() 146 UserInfo user2 = createUser("User 2", UserInfo.FLAG_ADMIN); in testAdd2Users() 158 UserInfo userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testRemoveUser() 166 UserInfo userInfo1 = createUser("Guest 1", UserInfo.FLAG_GUEST); in testAddGuest() [all …]
|
D | UserManagerServiceCreateProfileTest.java | 23 import android.content.pm.UserInfo; 62 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup() 76 UserInfo secondaryUser = addUser(); in testGetProfiles() 77 UserInfo profile = addProfile(secondaryUser); in testGetProfiles() 80 List<UserInfo> users = in testGetProfiles() 102 UserInfo secondaryUser = addUser(); in testProfileBadge() 122 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in testProfileBadgeUnique() 123 UserInfo system = users.get(0); in testProfileBadgeUnique() 128 UserInfo profile = addProfile(system); in testProfileBadgeUnique() 136 UserInfo secondaryUser = addUser(); in testProfileBadgeReuse() [all …]
|
D | UserManagerServiceUserInfoTest.java | 19 import android.content.pm.UserInfo; 66 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup() 90 UserInfo info = createUser(); in testParcelUnparcelUserInfo() 100 UserInfo read = UserInfo.CREATOR.createFromParcel(in); in testParcelUnparcelUserInfo() 110 UserInfo userInfo = mUserManagerService.getUserInfo(UserHandle.USER_SYSTEM); in testGetUserName() 123 private UserInfo createUser() { in createUser() 124 UserInfo user = new UserInfo(/*id*/ 21, "A Name", "A path", /*flags*/ 0x0ff0ff); in createUser() 137 private void assertUserInfoEquals(UserInfo one, UserInfo two) { in assertUserInfoEquals()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/users/ |
D | UserManagerHelper.java | 24 import android.content.pm.UserInfo; 98 public UserInfo getForegroundUserInfo() { in getForegroundUserInfo() 121 public UserInfo getCurrentProcessUserInfo() { in getCurrentProcessUserInfo() 137 public List<UserInfo> getAllUsersExcludesCurrentProcessUser() { in getAllUsersExcludesCurrentProcessUser() 147 public List<UserInfo> getAllUsersExcludesForegroundUser() { in getAllUsersExcludesForegroundUser() 156 public List<UserInfo> getAllUsersExcludesSystemUser() { in getAllUsersExcludesSystemUser() 166 public List<UserInfo> getAllUsersExceptUser(int userId) { in getAllUsersExceptUser() 167 List<UserInfo> others = mUserManager.getUsers(/* excludeDying= */true); in getAllUsersExceptUser() 169 for (Iterator<UserInfo> iterator = others.iterator(); iterator.hasNext(); ) { in getAllUsersExceptUser() 170 UserInfo userInfo = iterator.next(); in getAllUsersExceptUser() [all …]
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/users/ |
D | UserManagerHelperTest.java | 30 import android.content.pm.UserInfo; 61 private UserInfo mCurrentProcessUser; 62 private UserInfo mSystemUser; 80 UserInfo testInfo = new UserInfo(); in userIsSystemUser() 91 UserInfo otherUser1 = createUserInfoForId(10); in getAllUsersExcludesSystemUser() 92 UserInfo otherUser2 = createUserInfoForId(11); in getAllUsersExcludesSystemUser() 93 UserInfo otherUser3 = createUserInfoForId(12); in getAllUsersExcludesSystemUser() 95 List<UserInfo> testUsers = new ArrayList<>(); in getAllUsersExcludesSystemUser() 111 UserInfo user1 = createUserInfoForId(10); in getAllUsersExceptUser() 112 UserInfo user2 = createUserInfoForId(10); in getAllUsersExceptUser() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/users/ |
D | UserManagerHelperRoboTest.java | 27 import android.content.pm.UserInfo; 104 UserInfo currentProcessUser = createUserInfoForId(12); in getAllUsersExcludesCurrentProcessUser() 106 UserInfo otherUser1 = createUserInfoForId(13); in getAllUsersExcludesCurrentProcessUser() 107 UserInfo otherUser2 = createUserInfoForId(11); in getAllUsersExcludesCurrentProcessUser() 108 UserInfo otherUser3 = createUserInfoForId(14); in getAllUsersExcludesCurrentProcessUser() 110 List<UserInfo> testUsers = new ArrayList<>(); in getAllUsersExcludesCurrentProcessUser() 127 UserInfo foregroundUser = createUserInfoForId(17); in getAllUsersExcludesForegroundUser() 129 UserInfo otherUser1 = createUserInfoForId(11); in getAllUsersExcludesForegroundUser() 130 UserInfo otherUser2 = createUserInfoForId(18); in getAllUsersExcludesForegroundUser() 131 UserInfo otherUser3 = createUserInfoForId(16); in getAllUsersExcludesForegroundUser() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/ |
D | BaseLockSettingsServiceTests.java | 34 import android.content.pm.UserInfo; 64 private static final UserInfo PRIMARY_USER_INFO = new UserInfo(PRIMARY_USER_ID, null, null, 65 UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY); 66 private static final UserInfo SECONDARY_USER_INFO = new UserInfo(SECONDARY_USER_ID, null, null, 67 UserInfo.FLAG_INITIALIZED); 69 private ArrayList<UserInfo> mPrimaryUserProfiles = new ArrayList<>(); 136 final ArrayList<UserInfo> allUsers = new ArrayList<>(mPrimaryUserProfiles); in setUp() 157 private UserInfo installChildProfile(int profileId) { in installChildProfile() 158 final UserInfo userInfo = new UserInfo( in installChildProfile() 159 profileId, null, null, UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_MANAGED_PROFILE); in installChildProfile() [all …]
|
/frameworks/base/core/java/android/content/pm/ |
D | UserInfo.java | 29 public class UserInfo implements Parcelable { class 119 public UserInfo(int id, String name, int flags) { in UserInfo() method in UserInfo 123 public UserInfo(int id, String name, String iconPath, int flags) { in UserInfo() method in UserInfo 222 public UserInfo() { in UserInfo() method in UserInfo 225 public UserInfo(UserInfo orig) { in UserInfo() method in UserInfo 270 public static final Parcelable.Creator<UserInfo> CREATOR 271 = new Parcelable.Creator<UserInfo>() { 272 public UserInfo createFromParcel(Parcel source) { 273 return new UserInfo(source); 275 public UserInfo[] newArray(int size) { [all …]
|
/frameworks/base/core/java/android/os/ |
D | IUserManager.aidl | 23 import android.content.pm.UserInfo; 43 UserInfo createUser(in String name, int flags); in createUser() 44 UserInfo createProfileForUser(in String name, int flags, int userHandle, in createProfileForUser() 46 UserInfo createRestrictedProfile(String name, int parentUserHandle); in createRestrictedProfile() 55 UserInfo getPrimaryUser(); in getPrimaryUser() 56 List<UserInfo> getUsers(boolean excludeDying); in getUsers() 57 List<UserInfo> getProfiles(int userHandle, boolean enabledOnly); in getProfiles() 60 UserInfo getProfileParent(int userHandle); in getProfileParent() 62 UserInfo getUserInfo(int userHandle); in getUserInfo() 94 UserInfo createProfileForUserEvenWhenDisallowed(in String name, int flags, int userHandle, in createProfileForUserEvenWhenDisallowed()
|
D | UserManager.java | 38 import android.content.pm.UserInfo; 1202 UserInfo user = getUserInfo(getUserHandle()); in getUserName() 1242 UserInfo user = getUserInfo(UserHandle.myUserId()); in isPrimaryUser() 1272 UserInfo user = getUserInfo(userId); in isUserAdmin() 1332 UserInfo user = getUserInfo(id); in isGuestUser() 1342 UserInfo user = getUserInfo(UserHandle.myUserId()); in isGuestUser() 1436 final UserInfo user = getUserInfo(userId); in isUserEphemeral() 1594 public UserInfo getUserInfo(@UserIdInt int userHandle) { in getUserInfo() 1815 public UserInfo createUser(String name, int flags) { in createUser() 1816 UserInfo user = null; in createUser() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | RestrictedLockUtilsTest.java | 34 import android.content.pm.UserInfo; 176 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 177 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 178 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile() 205 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 206 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 207 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile() 229 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() 230 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() 231 when(mUserManager.getProfiles(mUserId)).thenReturn(Arrays.asList(new UserInfo[] { in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile() [all …]
|
/frameworks/base/core/java/android/webkit/ |
D | UserPackage.java | 22 import android.content.pm.UserInfo; 34 private final UserInfo mUserInfo; 39 public UserPackage(UserInfo user, PackageInfo packageInfo) { in UserPackage() 50 List<UserInfo> users = getAllUsers(context); in getPackageInfosAllUsers() 52 for (UserInfo user : users) { in getPackageInfosAllUsers() 91 public UserInfo getUserInfo() { in getUserInfo() 100 private static List<UserInfo> getAllUsers(Context context) { in getAllUsers()
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | NotificationAssistantsTest.java | 34 import android.content.pm.UserInfo; 75 UserInfo mZero = new UserInfo(0, "zero", 0); 76 UserInfo mTen = new UserInfo(10, "ten", 0); 96 List<UserInfo> users = new ArrayList<>(); in setUp() 99 users.add(new UserInfo(11, "11", 0)); in setUp() 100 users.add(new UserInfo(12, "12", 0)); in setUp() 101 for (UserInfo user : users) { in setUp()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | UserManagerService.java | 43 import android.content.pm.UserInfo; 198 UserInfo.FLAG_MANAGED_PROFILE 199 | UserInfo.FLAG_EPHEMERAL 200 | UserInfo.FLAG_RESTRICTED 201 | UserInfo.FLAG_GUEST 202 | UserInfo.FLAG_DEMO; 254 UserInfo info; 552 UserInfo currentGuestUser = findCurrentGuestUser(); in systemReady() 568 ArrayList<UserInfo> partials = new ArrayList<>(); in cleanupPartialUsers() 572 UserInfo ui = mUsers.valueAt(i).info; in cleanupPartialUsers() [all …]
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/testutils/shadow/ |
D | ShadowUserManager.java | 20 import android.content.pm.UserInfo; 62 public List<UserInfo> getProfiles() { in getProfiles() 63 UserInfo userInfo = new UserInfo(); in getProfiles() 65 List<UserInfo> userInfos = new ArrayList<>(); in getProfiles()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/car/ |
D | UserGridRecyclerView.java | 27 import android.content.pm.UserInfo; 98 private List<UserRecord> createUserRecords(List<UserInfo> userInfoList) { in createUserRecords() 100 for (UserInfo userInfo : userInfoList) { in createUserRecords() 129 UserInfo userInfo = new UserInfo(); in addGuestUserRecord() 139 UserInfo userInfo = new UserInfo(); in addUserRecord() 284 private class AddNewUserTask extends AsyncTask<String, Void, UserInfo> { 287 protected UserInfo doInBackground(String... userNames) { in doInBackground() 296 protected void onPostExecute(UserInfo user) { in onPostExecute() 329 public final UserInfo mInfo; 334 public UserRecord(UserInfo userInfo, boolean isStartGuestSession, boolean isAddUser, in UserRecord()
|
/frameworks/base/apct-tests/perftests/multiuser/src/android/multiuser/ |
D | UserLifecycleTests.java | 26 import android.content.pm.UserInfo; 102 final UserInfo userInfo = mUm.createUser("TestUser", 0); in createAndStartUser() 120 final UserInfo userInfo = mUm.createUser("TestUser", 0); in switchUser() 136 final UserInfo userInfo = mUm.createUser("TestUser", 0); in stopUser() 156 final UserInfo userInfo = mUm.createUser("TestUser", 0); in lockedBootCompleted() 175 final UserInfo userInfo = mUm.createProfileForUser("TestUser", in managedProfileUnlock() 176 UserInfo.FLAG_MANAGED_PROFILE, mAm.getCurrentUser()); in managedProfileUnlock() 195 final UserInfo userInfo = mUm.createUser("TestUser", in ephemeralUserStopped() 196 UserInfo.FLAG_EPHEMERAL | UserInfo.FLAG_DEMO); in ephemeralUserStopped() 226 final UserInfo userInfo = mUm.createProfileForUser("TestUser", in managedProfileStopped() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/ |
D | ManagedProfileControllerImpl.java | 23 import android.content.pm.UserInfo; 37 private final LinkedList<UserInfo> mProfiles; 44 mProfiles = new LinkedList<UserInfo>(); in ManagedProfileControllerImpl() 63 for (UserInfo ui : mProfiles) { in setWorkModeEnabled() 79 for (UserInfo ui : mUserManager.getEnabledProfiles(user)) { in reloadManagedProfiles() 103 for (UserInfo ui : mProfiles) { in isWorkModeEnabled()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | MockSystemServices.java | 42 import android.content.pm.UserInfo; 171 addUser(UserHandle.USER_SYSTEM, UserInfo.FLAG_PRIMARY, UserHandle.USER_SYSTEM); in MockSystemServices() 180 private final ArrayList<UserInfo> mUserInfos = new ArrayList<>(); 194 return addUser(userId, flags, UserInfo.NO_PROFILE_GROUP_ID); in addUser() 199 final UserInfo uh = new UserInfo(userId, "user" + userId, flags); in addUser() 216 final UserInfo ui = getUserInfo(userId1); in addUser() 229 List<UserInfo> profiles = getProfiles(userId13); in addUser() 257 private UserInfo getUserInfo(int userId) { in getUserInfo() 258 for (final UserInfo ui : mUserInfos) { in getUserInfo() 266 private List<UserInfo> getProfiles(int userId) { in getProfiles() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | ManagedUserContentResolverTest.java | 19 import android.content.pm.UserInfo; 40 protected UserInfo createUser() throws RemoteException { in createUser() 42 UserInfo.FLAG_MANAGED_PROFILE, UserHandle.myUserId()); in createUser()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/ |
D | IntentForwarderActivityTest.java | 25 import android.content.pm.UserInfo; 66 private static UserInfo MANAGED_PROFILE_INFO = new UserInfo(); 69 MANAGED_PROFILE_INFO.flags = UserInfo.FLAG_MANAGED_PROFILE; 72 private static UserInfo CURRENT_USER_INFO = new UserInfo(); 107 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_canForward_sendIntent() 140 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_cannotForward_sendIntent() 162 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_noManagedProfile_sendIntent() 183 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_canForward_chooserIntent() 225 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_canForward_selectorIntent()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | SecurityControllerTest.java | 37 import android.content.pm.UserInfo; 89 when(mUserManager.getUserInfo(anyInt())).thenReturn(new UserInfo()); in setUp() 132 List<UserInfo> profiles = Arrays.asList(new UserInfo(PRIMARY_USER_ID, "Primary", in testWorkAccount() 133 UserInfo.FLAG_PRIMARY), in testWorkAccount() 134 new UserInfo(MANAGED_USER_ID, "Working", in testWorkAccount() 135 UserInfo.FLAG_MANAGED_PROFILE)); in testWorkAccount()
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | VpnTest.java | 19 import static android.content.pm.UserInfo.FLAG_ADMIN; 20 import static android.content.pm.UserInfo.FLAG_MANAGED_PROFILE; 21 import static android.content.pm.UserInfo.FLAG_PRIMARY; 22 import static android.content.pm.UserInfo.FLAG_RESTRICTED; 57 import android.content.pm.UserInfo; 115 static final UserInfo primaryUser = new UserInfo(27, "Primary", FLAG_ADMIN | FLAG_PRIMARY); 116 static final UserInfo secondaryUser = new UserInfo(15, "Secondary", FLAG_ADMIN); 117 static final UserInfo restrictedProfileA = new UserInfo(40, "RestrictedA", FLAG_RESTRICTED); 118 static final UserInfo restrictedProfileB = new UserInfo(42, "RestrictedB", FLAG_RESTRICTED); 119 static final UserInfo managedProfileA = new UserInfo(45, "ManagedA", FLAG_MANAGED_PROFILE); [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | UserSwitchingDialog.java | 21 import android.content.pm.UserInfo; 54 final protected UserInfo mOldUser; 55 final protected UserInfo mNewUser; 60 public UserSwitchingDialog(ActivityManagerService service, Context context, UserInfo oldUser, in UserSwitchingDialog() 61 UserInfo newUser, boolean aboveSystem, String switchingFromSystemUserMessage, in UserSwitchingDialog()
|
D | UserController.java | 56 import android.content.pm.UserInfo; 285 if (UserInfo.isSystemOnly(userId)) { in getRunningUsersLU() 366 final UserInfo parent = mInjector.getUserManager().getProfileParent(userId); in finishUserBoot() 463 UserInfo parent = mInjector.getUserManager().getProfileParent(userId); in finishUserUnlocked() 481 final UserInfo info = getUserInfo(userId); in finishUserUnlocked() 506 UserInfo userInfo = getUserInfo(userId); in finishUserUnlockedCompleted() 788 int userGroupId = mUserProfileGroupIds.get(userId, UserInfo.NO_PROFILE_GROUP_ID); 794 UserInfo.NO_PROFILE_GROUP_ID); 795 boolean sameGroup = (userGroupId != UserInfo.NO_PROFILE_GROUP_ID) 832 UserInfo userInfo = getUserInfo(oldUserId); [all …]
|