Home
last modified time | relevance | path

Searched refs:UserInfo (Results 1 – 25 of 168) sorted by relevance

1234567

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerTest.java25 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 userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testRemoveUserByHandle()
[all …]
DUserManagerServiceCreateProfileTest.java23 import android.content.pm.UserInfo;
63 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup()
77 UserInfo secondaryUser = addUser(); in testGetProfiles()
78 UserInfo profile = addProfile(secondaryUser); in testGetProfiles()
81 List<UserInfo> users = in testGetProfiles()
103 UserInfo secondaryUser = addUser(); in testProfileBadge()
123 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in testProfileBadgeUnique()
124 UserInfo system = users.get(0); in testProfileBadgeUnique()
129 UserInfo profile = addProfile(system); in testProfileBadgeUnique()
137 UserInfo secondaryUser = addUser(); in testProfileBadgeReuse()
[all …]
DUserManagerServiceUserInfoTest.java23 import android.content.pm.UserInfo;
67 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup()
91 UserInfo info = createUser(); in testParcelUnparcelUserInfo()
101 UserInfo read = UserInfo.CREATOR.createFromParcel(in); in testParcelUnparcelUserInfo()
111 UserInfo userInfo = mUserManagerService.getUserInfo(UserHandle.USER_SYSTEM); in testGetUserName()
124 private UserInfo createUser() { in createUser()
125 UserInfo user = new UserInfo(/*id*/ 21, "A Name", "A path", /*flags*/ 0x0ff0ff); in createUser()
138 private void assertUserInfoEquals(UserInfo one, UserInfo two) { in assertUserInfoEquals()
/frameworks/opt/car/services/tests/src/com/android/internal/car/
DCarHelperServiceTest.java24 import android.content.pm.UserInfo;
78 UserInfo admin = mockAdminWithDefaultName(/* adminId= */ 10); in testStartsSecondaryAdminUserOnFirstRun()
93 UserInfo admin = mockAdminWithDefaultName(/* adminId= */ 10); in testUpdateLastActiveUserOnFirstRun()
105 List<UserInfo> users = new ArrayList<>(); in testStartsLastActiveUserOnReboot()
108 UserInfo admin = in testStartsLastActiveUserOnReboot()
109 new UserInfo(adminUserId, DEFAULT_NAME, UserInfo.FLAG_ADMIN); in testStartsLastActiveUserOnReboot()
112 UserInfo secUser = in testStartsLastActiveUserOnReboot()
113 new UserInfo(secUserId, DEFAULT_NAME, UserInfo.FLAG_ADMIN); in testStartsLastActiveUserOnReboot()
126 private UserInfo mockAdminWithDefaultName(int adminId) { in mockAdminWithDefaultName()
127 UserInfo admin = new UserInfo(adminId, DEFAULT_NAME, UserInfo.FLAG_ADMIN); in mockAdminWithDefaultName()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/testutils/shadow/
DShadowUserManager.java21 import android.content.pm.UserInfo;
32 private List<UserInfo> mUserInfos = addProfile(0, "Owner");
45 protected List<UserInfo> getProfiles() { in getProfiles()
49 public List<UserInfo> addProfile(int id, String name) { in addProfile()
50 List<UserInfo> userInfoList = mUserInfos; in addProfile()
54 final UserInfo userInfo = new UserInfo(); in addProfile()
62 protected List<UserInfo> getProfiles(@UserIdInt int userHandle) { in getProfiles()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DBaseLockSettingsServiceTests.java34 import android.content.pm.UserInfo;
66 private static final UserInfo PRIMARY_USER_INFO = new UserInfo(PRIMARY_USER_ID, null, null,
67 UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY);
68 private static final UserInfo SECONDARY_USER_INFO = new UserInfo(SECONDARY_USER_ID, null, null,
69 UserInfo.FLAG_INITIALIZED);
71 private ArrayList<UserInfo> mPrimaryUserProfiles = new ArrayList<>();
152 for (UserInfo profile : mPrimaryUserProfiles) { in setUp()
157 final ArrayList<UserInfo> allUsers = new ArrayList<>(mPrimaryUserProfiles); in setUp()
178 private UserInfo installChildProfile(int profileId) { in installChildProfile()
179 final UserInfo userInfo = new UserInfo( in installChildProfile()
[all …]
/frameworks/base/core/java/android/content/pm/
DUserInfo.java30 public class UserInfo implements Parcelable { class
132 public UserInfo(int id, String name, int flags) { in UserInfo() method in UserInfo
137 public UserInfo(int id, String name, String iconPath, int flags) { in UserInfo() method in UserInfo
242 public UserInfo() { in UserInfo() method in UserInfo
245 public UserInfo(UserInfo orig) { in UserInfo() method in UserInfo
292 public static final @android.annotation.NonNull Parcelable.Creator<UserInfo> CREATOR
293 = new Parcelable.Creator<UserInfo>() {
294 public UserInfo createFromParcel(Parcel source) {
295 return new UserInfo(source);
297 public UserInfo[] newArray(int size) {
[all …]
/frameworks/base/core/java/android/os/
DIUserManager.aidl23 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()
63 UserInfo getUserInfo(int userHandle); in getUserInfo()
95 UserInfo createProfileForUserEvenWhenDisallowed(in String name, int flags, int userHandle, in createProfileForUserEvenWhenDisallowed()
DUserManager.java39 import android.content.pm.UserInfo;
1405 UserInfo user = getUserInfo(UserHandle.myUserId()); in isPrimaryUser()
1441 UserInfo user = getUserInfo(userId); in isUserAdmin()
1523 UserInfo user = getUserInfo(id); in isGuestUser()
1536 UserInfo user = getUserInfo(UserHandle.myUserId()); in isGuestUser()
1630 final UserInfo user = getUserInfo(userId); in isUserEphemeral()
1792 public UserInfo getUserInfo(@UserIdInt int userHandle) { in getUserInfo()
2017 public UserInfo createUser(String name, int flags) { in createUser()
2018 UserInfo user = null; in createUser()
2039 public UserInfo createGuest(Context context, String name) { in createGuest()
[all …]
/frameworks/base/core/java/android/webkit/
DUserPackage.java22 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/core/java/com/android/server/pm/
DUserManagerService.java43 import android.content.pm.UserInfo;
200 UserInfo.FLAG_MANAGED_PROFILE
201 | UserInfo.FLAG_EPHEMERAL
202 | UserInfo.FLAG_RESTRICTED
203 | UserInfo.FLAG_GUEST
204 | UserInfo.FLAG_DEMO;
256 UserInfo info;
564 UserInfo currentGuestUser = findCurrentGuestUser(); in systemReady()
580 ArrayList<UserInfo> partials = new ArrayList<>(); in cleanupPartialUsers()
584 UserInfo ui = mUsers.valueAt(i).info; in cleanupPartialUsers()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java40 import android.content.pm.UserInfo;
184 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
185 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
212 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
213 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
235 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
236 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
271 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
272 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
310 private UserInfo setUpUser(int userId, ComponentName[] admins) { in setUpUser()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DNotificationAssistantsTest.java35 import android.content.pm.UserInfo;
75 UserInfo mZero = new UserInfo(0, "zero", 0);
76 UserInfo mTen = new UserInfo(10, "ten", 0);
97 List<UserInfo> users = new ArrayList<>(); in setUp()
100 users.add(new UserInfo(11, "11", 0)); in setUp()
101 users.add(new UserInfo(12, "12", 0)); in setUp()
102 for (UserInfo user : users) { in setUp()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DManagedProfileControllerImpl.java23 import android.content.pm.UserInfo;
43 private final LinkedList<UserInfo> mProfiles;
53 mProfiles = new LinkedList<UserInfo>(); in ManagedProfileControllerImpl()
72 for (UserInfo ui : mProfiles) { in setWorkModeEnabled()
88 for (UserInfo ui : mUserManager.getEnabledProfiles(user)) { in reloadManagedProfiles()
112 for (UserInfo ui : mProfiles) { in isWorkModeEnabled()
/frameworks/base/core/tests/coretests/src/android/content/
DManagedUserContentResolverTest.java19 import android.content.pm.UserInfo;
41 protected UserInfo createUser() throws RemoteException { in createUser()
43 UserInfo.FLAG_MANAGED_PROFILE, UserHandle.myUserId()); in createUser()
DSecondaryUserContentResolverTest.java19 import android.content.pm.UserInfo;
40 protected UserInfo createUser() throws RemoteException { in createUser()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/statusbar/car/
DUserGridRecyclerView.java28 import android.content.pm.UserInfo;
102 private List<UserRecord> createUserRecords(List<UserInfo> userInfoList) { in createUserRecords()
111 for (UserInfo userInfo : userInfoList) { in createUserRecords()
144 UserInfo userInfo = new UserInfo(); in createStartGuestUserRecord()
154 UserInfo userInfo = new UserInfo(); in createAddUserRecord()
334 private class AddNewUserTask extends AsyncTask<String, Void, UserInfo> {
337 protected UserInfo doInBackground(String... userNames) { in doInBackground()
346 protected void onPostExecute(UserInfo user) { in onPostExecute()
379 public final UserInfo mInfo;
384 public UserRecord(UserInfo userInfo, boolean isStartGuestSession, boolean isAddUser, in UserRecord()
/frameworks/base/apct-tests/perftests/multiuser/src/android/multiuser/
DUserLifecycleTests.java26 import android.content.pm.UserInfo;
104 final UserInfo userInfo = mUm.createUser("TestUser", 0); in createAndStartUser()
122 final UserInfo userInfo = mUm.createUser("TestUser", 0); in switchUser()
179 final UserInfo userInfo = mUm.createUser("TestUser", 0); in stopUser()
199 final UserInfo userInfo = mUm.createUser("TestUser", 0); in lockedBootCompleted()
218 final UserInfo userInfo = mUm.createProfileForUser("TestUser", in managedProfileUnlock()
219 UserInfo.FLAG_MANAGED_PROFILE, mAm.getCurrentUser()); in managedProfileUnlock()
238 final UserInfo userInfo = mUm.createProfileForUser("TestUser", in managedProfileUnlock_stopped()
239 UserInfo.FLAG_MANAGED_PROFILE, mAm.getCurrentUser()); in managedProfileUnlock_stopped()
266 final UserInfo userInfo = mUm.createUser("TestUser", in ephemeralUserStopped()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DMockSystemServices.java43 import android.content.pm.UserInfo;
177 addUser(UserHandle.USER_SYSTEM, UserInfo.FLAG_PRIMARY, UserHandle.USER_SYSTEM); in MockSystemServices()
186 private final ArrayList<UserInfo> mUserInfos = new ArrayList<>();
200 return addUser(userId, flags, UserInfo.NO_PROFILE_GROUP_ID); in addUser()
205 final UserInfo uh = new UserInfo(userId, "user" + userId, flags); in addUser()
222 final UserInfo ui = getUserInfo(userId1); in addUser()
235 List<UserInfo> profiles = getProfiles(userId13); in addUser()
263 private UserInfo getUserInfo(int userId) { in getUserInfo()
264 for (final UserInfo ui : mUserInfos) { in getUserInfo()
272 private List<UserInfo> getProfiles(int userId) { in getProfiles()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DSecurityControllerTest.java35 import android.content.pm.UserInfo;
87 when(mUserManager.getUserInfo(anyInt())).thenReturn(new UserInfo()); in setUp()
133 List<UserInfo> profiles = Arrays.asList(new UserInfo(PRIMARY_USER_ID, "Primary", in testWorkAccount()
134 UserInfo.FLAG_PRIMARY), in testWorkAccount()
135 new UserInfo(MANAGED_USER_ID, "Working", in testWorkAccount()
136 UserInfo.FLAG_MANAGED_PROFILE)); in testWorkAccount()
/frameworks/base/services/core/java/com/android/server/am/
DUserSwitchingDialog.java21 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()
DUserController.java57 import android.content.pm.UserInfo;
304 if (UserInfo.isSystemOnly(userId)) { in getRunningUsersLU()
387 final UserInfo parent = mInjector.getUserManager().getProfileParent(userId); in finishUserBoot()
485 UserInfo parent = mInjector.getUserManager().getProfileParent(userId); in finishUserUnlocked()
503 final UserInfo info = getUserInfo(userId); in finishUserUnlocked()
528 UserInfo userInfo = getUserInfo(userId); in finishUserUnlockedCompleted()
885 int userGroupId = mUserProfileGroupIds.get(userId, UserInfo.NO_PROFILE_GROUP_ID);
891 UserInfo.NO_PROFILE_GROUP_ID);
892 boolean sameGroup = (userGroupId != UserInfo.NO_PROFILE_GROUP_ID)
930 UserInfo userInfo = getUserInfo(oldUserId);
[all …]
/frameworks/base/tests/net/java/com/android/server/connectivity/
DVpnTest.java19 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;
58 import android.content.pm.UserInfo;
116 static final UserInfo primaryUser = new UserInfo(27, "Primary", FLAG_ADMIN | FLAG_PRIMARY);
117 static final UserInfo secondaryUser = new UserInfo(15, "Secondary", FLAG_ADMIN);
118 static final UserInfo restrictedProfileA = new UserInfo(40, "RestrictedA", FLAG_RESTRICTED);
119 static final UserInfo restrictedProfileB = new UserInfo(42, "RestrictedB", FLAG_RESTRICTED);
120 static final UserInfo managedProfileA = new UserInfo(45, "ManagedA", FLAG_MANAGED_PROFILE);
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DConfigurationMapTest.java26 import android.content.pm.UserInfo;
66 private static final SparseArray<List<UserInfo>> USER_PROFILES = new SparseArray<>();
69 new UserInfo(UserHandle.USER_SYSTEM, "Owner", 0), in USER_PROFILES.put()
70 new UserInfo(12, "Managed Profile", 0))); in USER_PROFILES.put()
71 USER_PROFILES.put(10, Arrays.asList(new UserInfo(10, "Alice", 0)));
72 USER_PROFILES.put(11, Arrays.asList(new UserInfo(11, "Bob", 0)));
89 public List<UserInfo> answer(int userId) { in setUp()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DTaskPersisterTest.java26 import android.content.pm.UserInfo;
61 mTestUserId = createUser(TEST_USER_NAME, UserInfo.FLAG_GUEST); in setUp()
91 UserInfo user = mUserManager.createUser(name, flags); in createUser()

1234567