Home
last modified time | relevance | path

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

123456789

/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerTest.java33 import android.content.pm.UserInfo;
129 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers()
130 for (UserInfo user : list) { in removeExistingUsers()
147 UserInfo userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testAddGuest()
150 List<UserInfo> list = mUserManager.getUsers(); in testAddGuest()
151 for (UserInfo user : list) { in testAddGuest()
166 UserInfo userInfo = createProfileForUser("Clone user1", in testCloneUser()
170 UserInfo userInfo2 = createProfileForUser("Clone user2", in testCloneUser()
180 List<UserInfo> list = mUserManager.getUsers(); in testCloneUser()
181 List<UserInfo> cloneUsers = list.stream().filter( in testCloneUser()
[all …]
DUserManagerServiceCreateProfileTest.java25 import android.content.pm.UserInfo;
70 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup()
85 UserInfo secondaryUser = addUser(); in testGetProfiles()
86 UserInfo profile = addProfile(secondaryUser); in testGetProfiles()
89 List<UserInfo> users = in testGetProfiles()
108 UserInfo secondaryUser = addUser(); in testGetProfileIds_specifyType()
109 UserInfo profile = addProfile(secondaryUser); in testGetProfileIds_specifyType()
137 UserInfo secondaryUser = addUser(); in testProfileBadge()
160 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in testProfileBadgeUnique()
161 UserInfo system = users.get(0); in testProfileBadgeUnique()
[all …]
DUserManagerServiceUserInfoTest.java19 import static android.content.pm.UserInfo.FLAG_DEMO;
20 import static android.content.pm.UserInfo.FLAG_DISABLED;
21 import static android.content.pm.UserInfo.FLAG_EPHEMERAL;
22 import static android.content.pm.UserInfo.FLAG_FULL;
23 import static android.content.pm.UserInfo.FLAG_GUEST;
24 import static android.content.pm.UserInfo.FLAG_INITIALIZED;
25 import static android.content.pm.UserInfo.FLAG_MANAGED_PROFILE;
26 import static android.content.pm.UserInfo.FLAG_PROFILE;
27 import static android.content.pm.UserInfo.FLAG_RESTRICTED;
28 import static android.content.pm.UserInfo.FLAG_SYSTEM;
[all …]
DUserManagerServiceUserTypeTest.java19 import static android.content.pm.UserInfo.FLAG_DEMO;
20 import static android.content.pm.UserInfo.FLAG_EPHEMERAL;
21 import static android.content.pm.UserInfo.FLAG_FULL;
22 import static android.content.pm.UserInfo.FLAG_GUEST;
23 import static android.content.pm.UserInfo.FLAG_MANAGED_PROFILE;
24 import static android.content.pm.UserInfo.FLAG_PROFILE;
25 import static android.content.pm.UserInfo.FLAG_RESTRICTED;
26 import static android.content.pm.UserInfo.FLAG_SYSTEM;
37 import android.content.pm.UserInfo;
227 UserInfo.getDefaultUserType(FLAG_RESTRICTED)); in testGetDefaultUserType()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/job/
DJobConcurrencyManagerTest.java30 import android.content.pm.UserInfo;
139 private UserInfo createCurrentUser(boolean isProfile) { in createCurrentUser()
140 final UserInfo ui = createNewUser(); in createCurrentUser()
145 private UserInfo createPrimaryUser(boolean isProfile) { in createPrimaryUser()
146 final UserInfo ui = createNewUser(); in createPrimaryUser()
151 private UserInfo createUnexpiredUser(boolean isProfile) { in createUnexpiredUser()
152 final UserInfo ui = createNewUser(); in createUnexpiredUser()
157 private UserInfo createRestrictedUser(boolean isProfile) { in createRestrictedUser()
158 final UserInfo ui = createNewUser(); in createRestrictedUser()
165 private UserInfo createNewProfile(UserInfo parent) { in createNewProfile()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/testutils/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/core/java/android/os/
DIUserManager.aidl24 import android.content.pm.UserInfo;
44 UserInfo createUserWithThrow(in String name, in String userType, int flags); in createUserWithThrow()
45 UserInfo preCreateUserWithThrow(in String userType); in preCreateUserWithThrow()
46UserInfo createProfileForUserWithThrow(in String name, in String userType, int flags, int userId, in createProfileForUserWithThrow()
48 UserInfo createRestrictedProfileWithThrow(String name, int parentUserHandle); in createRestrictedProfileWithThrow()
58 UserInfo getPrimaryUser(); in getPrimaryUser()
59 … List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated); in getUsers()
60 List<UserInfo> getProfiles(int userId, boolean enabledOnly); in getProfiles()
64 UserInfo getProfileParent(int userId); in getProfileParent()
68 UserInfo getUserInfo(int userId); in getUserInfo()
[all …]
DUserManager.java46 import android.content.pm.UserInfo;
47 import android.content.pm.UserInfo.UserInfoFlag;
1885 UserInfo userInfo = getUserInfo(mUserId); in getUserType()
1908 UserInfo userInfo = getUserInfo(mUserId); in getUserName()
1961 UserInfo user = getUserInfo(UserHandle.myUserId()); in isPrimaryUser()
1999 UserInfo user = getUserInfo(userId); in isUserAdmin()
2184 final UserInfo info = getUserInfo(mUserId); in getRestrictedProfileParent()
2201 UserInfo user = getUserInfo(userId); in isGuestUser()
2215 UserInfo user = getUserInfo(UserHandle.myUserId()); in isGuestUser()
2360 final UserInfo user = getUserInfo(userId); in isUserEphemeral()
[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/
DUserTypeDetails.java24 import android.content.pm.UserInfo;
25 import android.content.pm.UserInfo.UserInfoFlag;
292 return (mBaseType & UserInfo.FLAG_PROFILE) != 0; in isProfile()
296 return (mBaseType & UserInfo.FLAG_FULL) != 0; in isFull()
300 return (mBaseType & UserInfo.FLAG_SYSTEM) != 0; in isSystem()
340 pw.print(prefix); pw.print("mBaseType: "); pw.println(UserInfo.flagsToString(mBaseType)); in dump()
345 pw.println(UserInfo.flagsToString(mDefaultUserInfoPropertyFlags)); in dump()
538 return (mBaseType & UserInfo.FLAG_PROFILE) != 0; in isProfile()
543 return mBaseType == UserInfo.FLAG_FULL in hasValidBaseType()
544 || mBaseType == UserInfo.FLAG_PROFILE in hasValidBaseType()
[all …]
DUserManagerInternal.java23 import android.content.pm.UserInfo;
72 default void onUserCreated(UserInfo user, @Nullable Object token) {} in onUserCreated()
75 default void onUserRemoved(UserInfo user) {} in onUserRemoved()
191 public abstract UserInfo createUserEvenWhenDisallowed(String name, String userType, in createUserEvenWhenDisallowed()
254 public abstract @NonNull List<UserInfo> getUsers(boolean excludeDying); in getUsers()
261 public abstract @NonNull List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, in getUsers()
302 public abstract @Nullable UserInfo getUserInfo(@UserIdInt int userId); in getUserInfo()
307 public abstract @NonNull UserInfo[] getUserInfos(); in getUserInfos()
DUserManagerService.java48 import android.content.pm.UserInfo;
49 import android.content.pm.UserInfo.UserInfoFlag;
226 UserInfo.FLAG_MANAGED_PROFILE
227 | UserInfo.FLAG_PROFILE
228 | UserInfo.FLAG_EPHEMERAL
229 | UserInfo.FLAG_RESTRICTED
230 | UserInfo.FLAG_GUEST
231 | UserInfo.FLAG_DEMO
232 | UserInfo.FLAG_FULL;
294 UserInfo info;
[all …]
/frameworks/base/core/java/android/content/pm/
DUserInfo.java52 public class UserInfo implements Parcelable { class
238 public UserInfo(int id, String name, int flags) { in UserInfo() method in UserInfo
247 public UserInfo(int id, String name, String iconPath, int flags) { in UserInfo() method in UserInfo
251 public UserInfo(int id, String name, String iconPath, int flags, String userType) { in UserInfo() method in UserInfo
416 public UserInfo() { in UserInfo() method in UserInfo
419 public UserInfo(UserInfo orig) { in UserInfo() method in UserInfo
466 return DebugUtils.flagsToString(UserInfo.class, "FLAG_", flags); in flagsToString()
494 public static final @android.annotation.NonNull Parcelable.Creator<UserInfo> CREATOR
495 = new Parcelable.Creator<UserInfo>() {
496 public UserInfo createFromParcel(Parcel source) {
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DBaseLockSettingsServiceTests.java37 import android.content.pm.UserInfo;
77 private static final UserInfo PRIMARY_USER_INFO = new UserInfo(PRIMARY_USER_ID, null, null,
78 UserInfo.FLAG_INITIALIZED | UserInfo.FLAG_ADMIN | UserInfo.FLAG_PRIMARY);
79 private static final UserInfo SECONDARY_USER_INFO = new UserInfo(SECONDARY_USER_ID, null, null,
80 UserInfo.FLAG_INITIALIZED);
82 private ArrayList<UserInfo> mPrimaryUserProfiles = new ArrayList<>();
162 for (UserInfo profile : mPrimaryUserProfiles) { in setUp_baseServices()
167 final ArrayList<UserInfo> allUsers = new ArrayList<>(mPrimaryUserProfiles); in setUp_baseServices()
194 private UserInfo installChildProfile(int profileId) { in installChildProfile()
195 final UserInfo userInfo = new UserInfo( in installChildProfile()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DUserTracker.kt20 import android.content.pm.UserInfo
45 val userInfo: UserInfo
50 val userProfiles: List<UserInfo>
77 fun onProfilesChanged(profiles: List<UserInfo>) {} in addCallback()
/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/packages/SystemUI/tests/src/com/android/systemui/settings/
DUserTrackerImplTest.kt22 import android.content.pm.UserInfo in <lambda>()
75 val info = UserInfo(invocation.getArgument<Int>(0), "", UserInfo.FLAG_FULL) in <lambda>()
173 val info = UserInfo(id, "", UserInfo.FLAG_FULL) in <lambda>()
174 val infoProfile = UserInfo( in <lambda>()
178 UserInfo.FLAG_MANAGED_PROFILE, in <lambda>()
230 val info = UserInfo(id, "", UserInfo.FLAG_FULL) in <lambda>()
231 val infoProfile = UserInfo( in <lambda>()
235 UserInfo.FLAG_MANAGED_PROFILE, in <lambda>()
279 var lastUserProfiles = emptyList<UserInfo>() in <lambda>()
287 override fun onProfilesChanged(profiles: List<UserInfo>) { in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DManagedProfileControllerImpl.java23 import android.content.pm.UserInfo;
48 private final LinkedList<UserInfo> mProfiles;
59 mProfiles = new LinkedList<UserInfo>(); in ManagedProfileControllerImpl()
80 for (UserInfo ui : mProfiles) { in setWorkModeEnabled()
96 for (UserInfo ui : mUserManager.getEnabledProfiles(user)) { in reloadManagedProfiles()
120 for (UserInfo ui : mProfiles) { in isWorkModeEnabled()
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DMockSystemServices.java46 import android.content.pm.UserInfo;
203 systemUserDataDir = addUser(UserHandle.USER_SYSTEM, UserInfo.FLAG_PRIMARY, in MockSystemServices()
213 private final ArrayList<UserInfo> mUserInfos = new ArrayList<>();
227 return addUser(userId, flags, type, UserInfo.NO_PROFILE_GROUP_ID); in addUser()
232 final UserInfo uh = new UserInfo(userId, "user" + userId, flags); in addUser()
252 final UserInfo ui = getUserInfo(userId1); in addUser()
259 final UserInfo ui = getUserInfo(userHandle.getIdentifier()); in addUser()
272 List<UserInfo> profiles = getProfiles(userId13); in addUser()
279 mUserInfos.toArray(new UserInfo[mUserInfos.size()])); in addUser()
303 private UserInfo getUserInfo(int userId) { in getUserInfo()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DUserSwitcherControllerTest.kt24 import android.content.pm.UserInfo
85 private val ownerInfo = UserInfo(ownerId, "Owner", null,
86 UserInfo.FLAG_ADMIN or UserInfo.FLAG_FULL or UserInfo.FLAG_INITIALIZED or
87 UserInfo.FLAG_PRIMARY or UserInfo.FLAG_SYSTEM,
90 private val guestInfo = UserInfo(guestId, "Guest", null,
91 UserInfo.FLAG_FULL or UserInfo.FLAG_GUEST, UserManager.USER_TYPE_FULL_GUEST)
DSecurityControllerTest.java39 import android.content.pm.UserInfo;
90 when(mUserManager.getUserInfo(anyInt())).thenReturn(new UserInfo()); in setUp()
156 List<UserInfo> profiles = Arrays.asList(new UserInfo(PRIMARY_USER_ID, "Primary", in testWorkAccount()
157 UserInfo.FLAG_PRIMARY), in testWorkAccount()
158 new UserInfo(MANAGED_USER_ID, "Working", in testWorkAccount()
159 UserInfo.FLAG_MANAGED_PROFILE)); in testWorkAccount()
/frameworks/opt/car/services/tests/src/com/android/internal/car/
DCarServiceProxyTest.java29 import android.content.pm.UserInfo;
53 private final TargetUser mFromUser = new TargetUser(new UserInfo(101, "fromUser", 0));
54 private final TargetUser mToUser = new TargetUser(new UserInfo(102, "toUser", 0));
56 private final UserInfo mRemovedUser1 = new UserInfoBuilder(100).build();
57 private final UserInfo mRemovedUser2 = new UserInfoBuilder(200).build();
58 private final UserInfo mRemovedUser3 = new UserInfoBuilder(300).build();
/frameworks/base/services/tests/servicestests/src/com/android/server/apphibernation/
DAppHibernationServiceTest.java51 import android.content.pm.UserInfo;
86 private final List<UserInfo> mUserInfos = new ArrayList<>();
141 UserInfo userInfo = addUser(USER_ID_1); in setUp()
175 UserInfo user2 = addUser(USER_ID_2); in testSetHibernatingForUser_newUserUnlocked_packageIsHibernating()
212 UserInfo userInfo = in testGetHibernatingPackagesForUser_returnsCorrectPackages()
244 UserInfo user2 = addUser(USER_ID_2, packageInfos); in testUserLevelStatesInitializedFromDisk()
261 UserInfo user2 = addUser(USER_ID_2, new String[]{PACKAGE_NAME_1}); in testNonForceStoppedAppsNotHibernatedOnUnlock()
276 UserInfo user2 = addUser(USER_ID_2); in testUnhibernatedPackageForUserUnhibernatesPackageGloballyOnUnlock()
389 private UserInfo addUser(int userId) throws RemoteException { in addUser()
396 private UserInfo addUser(int userId, String[] packageNames) throws RemoteException { in addUser()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationLockscreenUserManager.java17 import android.content.pm.UserInfo;
64 SparseArray<UserInfo> getCurrentProfiles(); in getCurrentProfiles()
95 default void onCurrentProfilesChanged(SparseArray<UserInfo> currentProfiles) {} in onCurrentProfilesChanged()
/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()

123456789