Home
last modified time | relevance | path

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

12345678

/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()
139 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.java36 import android.content.pm.UserInfo;
73 private static final UserInfo PRIMARY_USER_INFO = new UserInfo(PRIMARY_USER_ID, null, null,
74 UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY);
75 private static final UserInfo SECONDARY_USER_INFO = new UserInfo(SECONDARY_USER_ID, null, null,
76 UserInfo.FLAG_INITIALIZED);
78 private ArrayList<UserInfo> mPrimaryUserProfiles = new ArrayList<>();
157 for (UserInfo profile : mPrimaryUserProfiles) { in setUp_baseServices()
162 final ArrayList<UserInfo> allUsers = new ArrayList<>(mPrimaryUserProfiles); in setUp_baseServices()
183 private UserInfo installChildProfile(int profileId) { in installChildProfile()
184 final UserInfo userInfo = new UserInfo( in installChildProfile()
[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 preCreateUser(int flags); in preCreateUser()
45 UserInfo createProfileForUser(in String name, int flags, int userHandle, in createProfileForUser()
47 UserInfo createRestrictedProfile(String name, int parentUserHandle); in createRestrictedProfile()
56 UserInfo getPrimaryUser(); in getPrimaryUser()
57 … List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated); in getUsers()
58 List<UserInfo> getProfiles(int userHandle, boolean enabledOnly); in getProfiles()
61 UserInfo getProfileParent(int userHandle); in getProfileParent()
64 UserInfo getUserInfo(int userHandle); in getUserInfo()
[all …]
DUserManager.java39 import android.content.pm.UserInfo;
40 import android.content.pm.UserInfo.UserInfoFlag;
1419 UserInfo user = getUserInfo(UserHandle.myUserId()); in isPrimaryUser()
1455 UserInfo user = getUserInfo(userId); in isUserAdmin()
1537 UserInfo user = getUserInfo(id); in isGuestUser()
1550 UserInfo user = getUserInfo(UserHandle.myUserId()); in isGuestUser()
1644 final UserInfo user = getUserInfo(userId); in isUserEphemeral()
1806 public UserInfo getUserInfo(@UserIdInt int userHandle) { in getUserInfo()
2033 public @Nullable UserInfo createUser(@Nullable String name, @UserInfoFlag int flags) { in createUser()
2034 UserInfo user = null; in createUser()
[all …]
/frameworks/base/core/java/android/content/pm/
DUserInfo.java34 public class UserInfo implements Parcelable { class
167 public UserInfo(int id, String name, int flags) { in UserInfo() method in UserInfo
172 public UserInfo(int id, String name, String iconPath, int flags) { in UserInfo() method in UserInfo
291 public UserInfo() { in UserInfo() method in UserInfo
294 public UserInfo(UserInfo orig) { in UserInfo() method in UserInfo
333 return DebugUtils.flagsToString(UserInfo.class, "FLAG_", flags); in flagsToString()
359 public static final @android.annotation.NonNull Parcelable.Creator<UserInfo> CREATOR
360 = new Parcelable.Creator<UserInfo>() {
361 public UserInfo createFromParcel(Parcel source) {
362 return new UserInfo(source);
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DUserManagerService.java45 import android.content.pm.UserInfo;
46 import android.content.pm.UserInfo.UserInfoFlag;
207 UserInfo.FLAG_MANAGED_PROFILE
208 | UserInfo.FLAG_EPHEMERAL
209 | UserInfo.FLAG_RESTRICTED
210 | UserInfo.FLAG_GUEST
211 | UserInfo.FLAG_DEMO;
264 UserInfo info;
576 UserInfo currentGuestUser = findCurrentGuestUser(); in systemReady()
592 ArrayList<UserInfo> partials = new ArrayList<>(); in cleanupPartialUsers()
[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/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/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/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/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/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/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/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;
58 final protected UserInfo mOldUser;
59 final protected UserInfo mNewUser;
64 public UserSwitchingDialog(ActivityManagerService service, Context context, UserInfo oldUser, in UserSwitchingDialog()
65 UserInfo newUser, boolean aboveSystem, String switchingFromSystemUserMessage, in UserSwitchingDialog()
DUserController.java57 import android.content.pm.UserInfo;
308 if (UserInfo.isSystemOnly(userId)) { in getRunningUsersLU()
393 final UserInfo parent = mInjector.getUserManager().getProfileParent(userId); in finishUserBoot()
492 UserInfo parent = mInjector.getUserManager().getProfileParent(userId); in finishUserUnlocked()
510 final UserInfo info = getUserInfo(userId); in finishUserUnlocked()
536 UserInfo userInfo = getUserInfo(userId); in finishUserUnlockedCompleted()
832 UserInfo userInfo = getUserInfo(userId);
907 int userGroupId = mUserProfileGroupIds.get(userId, UserInfo.NO_PROFILE_GROUP_ID);
913 UserInfo.NO_PROFILE_GROUP_ID);
914 boolean sameGroup = (userGroupId != UserInfo.NO_PROFILE_GROUP_ID)
[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/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;
60 import android.content.pm.UserInfo;
125 static final UserInfo primaryUser = new UserInfo(27, "Primary", FLAG_ADMIN | FLAG_PRIMARY);
126 static final UserInfo secondaryUser = new UserInfo(15, "Secondary", FLAG_ADMIN);
127 static final UserInfo restrictedProfileA = new UserInfo(40, "RestrictedA", FLAG_RESTRICTED);
128 static final UserInfo restrictedProfileB = new UserInfo(42, "RestrictedB", FLAG_RESTRICTED);
129 static final UserInfo managedProfileA = new UserInfo(45, "ManagedA", FLAG_MANAGED_PROFILE);
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/app/
DIntentForwarderActivityTest.java43 import android.content.pm.UserInfo;
85 private static UserInfo MANAGED_PROFILE_INFO = new UserInfo();
89 MANAGED_PROFILE_INFO.flags = UserInfo.FLAG_MANAGED_PROFILE;
92 private static UserInfo CURRENT_USER_INFO = new UserInfo();
136 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_canForward_sendIntent()
169 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_cannotForward_sendIntent()
191 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_noManagedProfile_sendIntent()
212 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_canForward_chooserIntent()
254 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_canForward_selectorIntent()
544 List<UserInfo> profiles = new ArrayList<>(); in forwardToManagedProfile_LoggingTest()
[all …]

12345678