Home
last modified time | relevance | path

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

12345678910>>...15

/frameworks/base/services/tests/VpnTests/java/com/android/server/
DVpnTestBase.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;
29 import android.content.pm.UserInfo;
60 protected static final UserInfo SYSTEM_USER = new UserInfo(0, "system", UserInfo.FLAG_PRIMARY);
61 protected static final UserInfo PRIMARY_USER = new UserInfo(27, "Primary",
63 protected static final UserInfo SECONDARY_USER = new UserInfo(15, "Secondary", FLAG_ADMIN);
64 protected static final UserInfo RESTRICTED_PROFILE_A = new UserInfo(40, "RestrictedA",
66 protected static final UserInfo RESTRICTED_PROFILE_B = new UserInfo(42, "RestrictedB",
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DUserManagerServiceCreateProfileTest.java25 import android.content.pm.UserInfo;
72 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in setup()
87 UserInfo secondaryUser = addUser(); in testGetProfiles()
88 UserInfo profile = addProfile(secondaryUser); in testGetProfiles()
91 List<UserInfo> users = in testGetProfiles()
110 UserInfo secondaryUser = addUser(); in testGetProfileIds_specifyType()
111 UserInfo profile = addProfile(secondaryUser); in testGetProfileIds_specifyType()
142 UserInfo secondaryUser = addUser(); in testProfileBadge()
165 List<UserInfo> users = mUserManagerService.getUsers(/* excludeDying */ false); in testProfileBadgeUnique()
166 UserInfo system = users.get(0); in testProfileBadgeUnique()
[all …]
DUserJourneyLoggerTest.java47 import android.content.pm.UserInfo;
124 UserInfo targetUser = new UserInfo(10, "test target user", in testCreateUserJourney()
125 UserInfo.FLAG_ADMIN | UserInfo.FLAG_FULL); in testCreateUserJourney()
155 UserInfo targetUser = in testCreatePrivateProfileUserJourney()
156 new UserInfo( in testCreatePrivateProfileUserJourney()
160 UserInfo.FLAG_PROFILE, in testCreatePrivateProfileUserJourney()
180 UserInfo.FLAG_PROFILE, in testCreatePrivateProfileUserJourney()
196 final UserInfo targetUser = new UserInfo(10, "test target user", in testRemoveUserJourney()
197 UserInfo.FLAG_ADMIN | UserInfo.FLAG_FULL); in testRemoveUserJourney()
228 final UserInfo targetUser = in testRemovePrivateProfileUserJourneyWithError()
[all …]
DUserManagerTest.java32 import android.content.pm.UserInfo;
133 List<UserInfo> list = mUserManager.getUsers(); in removeExistingUsers()
134 for (UserInfo user : list) { in removeExistingUsers()
154 UserInfo userInfo = createUser("Guest 1", UserInfo.FLAG_GUEST); in testAddGuest()
157 List<UserInfo> list = mUserManager.getUsers(); in testAddGuest()
158 for (UserInfo user : list) { in testAddGuest()
183 UserInfo cloneProfileUser = createProfileForUser("Clone user1", in testCloneUser()
187 UserInfo cloneProfileUser2 = createProfileForUser("Clone user2", in testCloneUser()
200 List<UserInfo> list = mUserManager.getUsers(); in testCloneUser()
201 List<UserInfo> cloneUsers = list.stream().filter( in testCloneUser()
[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_MAIN;
26 import static android.content.pm.UserInfo.FLAG_MANAGED_PROFILE;
27 import static android.content.pm.UserInfo.FLAG_PROFILE;
28 import static android.content.pm.UserInfo.FLAG_RESTRICTED;
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/testutils/com/android/settingslib/testutils/shadow/
DShadowUserManager.java21 import android.content.pm.UserInfo;
38 private List<UserInfo> mUserInfos = addProfile(0, "Owner");
52 protected List<UserInfo> getProfiles() { in getProfiles()
56 public List<UserInfo> addProfile(int id, String name) { in addProfile()
57 List<UserInfo> userInfoList = mUserInfos; in addProfile()
61 final UserInfo userInfo = new UserInfo(); in addProfile()
69 protected List<UserInfo> getProfiles(@UserIdInt int userHandle) { in getProfiles()
86 UserInfo userInfo = getUserInfo(UserHandle.myUserId()); in setIsAdminUser()
88 userInfo.flags |= UserInfo.FLAG_ADMIN; in setIsAdminUser()
90 userInfo.flags &= ~UserInfo.FLAG_ADMIN; in setIsAdminUser()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/user/data/repository/
DFakeUserRepository.kt20 import android.content.pm.UserInfo
44 UserInfo(
50 UserInfo(
53 /* flags= */ UserInfo.FLAG_MAIN,
61 private val _userInfos = MutableStateFlow<List<UserInfo>>(emptyList())
62 override val userInfos: Flow<List<UserInfo>> = _userInfos.asStateFlow()
68 override val selectedUserInfo: Flow<UserInfo> = selectedUser.map { it.userInfo } in <lambda>()
98 override fun getSelectedUserInfo(): UserInfo { in getSelectedUserInfo()
110 fun setUserInfos(infos: List<UserInfo>) { in setUserInfos()
115 userInfo: UserInfo, in setSelectedUserInfo()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/
DUserSwitcherViewModelTest.kt22 import android.content.pm.UserInfo in <lambda>()
110 UserInfo( in <lambda>()
114 /* flags= */ UserInfo.FLAG_PRIMARY or in <lambda>()
115 UserInfo.FLAG_ADMIN or in <lambda>()
116 UserInfo.FLAG_FULL, in <lambda>()
191 UserInfo( in <lambda>()
195 /* flags= */ UserInfo.FLAG_PRIMARY or in <lambda>()
196 UserInfo.FLAG_ADMIN or in <lambda>()
197 UserInfo.FLAG_FULL, in <lambda>()
200 UserInfo( in <lambda>()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DBaseLockSettingsServiceTests.java38 import android.content.pm.UserInfo;
84 protected UserInfo mPrimaryUserInfo;
85 protected UserInfo mSecondaryUserInfo;
86 protected UserInfo mTertiaryUserInfo;
88 private ArrayList<UserInfo> mPrimaryUserProfiles = new ArrayList<>();
177 new UserInfo( in setUp_baseServices()
181 UserInfo.FLAG_INITIALIZED in setUp_baseServices()
182 | UserInfo.FLAG_ADMIN in setUp_baseServices()
183 | UserInfo.FLAG_PRIMARY in setUp_baseServices()
184 | UserInfo.FLAG_MAIN in setUp_baseServices()
[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/core/java/android/content/pm/
DUserInfo.java56 public class UserInfo implements Parcelable { class
302 public UserInfo(int id, String name, int flags) { in UserInfo() method in UserInfo
311 public UserInfo(int id, String name, String iconPath, int flags) { in UserInfo() method in UserInfo
315 public UserInfo(int id, String name, String iconPath, int flags, String userType) { in UserInfo() method in UserInfo
499 public UserInfo() { in UserInfo() method in UserInfo
502 public UserInfo(UserInfo orig) { in UserInfo() method in UserInfo
549 return DebugUtils.flagsToString(UserInfo.class, "FLAG_", flags); in flagsToString()
577 public static final @android.annotation.NonNull Parcelable.Creator<UserInfo> CREATOR
578 = new Parcelable.Creator<UserInfo>() {
579 public UserInfo createFromParcel(Parcel source) {
[all …]
/frameworks/base/core/java/android/os/
DIUserManager.aidl25 import android.content.pm.UserInfo;
46 UserInfo createUserWithThrow(in String name, in String userType, int flags); in createUserWithThrow()
47 UserInfo preCreateUserWithThrow(in String userType); in preCreateUserWithThrow()
48UserInfo createProfileForUserWithThrow(in String name, in String userType, int flags, int userId, in createProfileForUserWithThrow()
50 UserInfo createRestrictedProfileWithThrow(String name, int parentUserHandle); in createRestrictedProfileWithThrow()
61 UserInfo getPrimaryUser(); in getPrimaryUser()
65 … List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, boolean excludePreCreated); in getUsers()
66 List<UserInfo> getProfiles(int userId, boolean enabledOnly); in getProfiles()
74 UserInfo getProfileParent(int userId); in getProfileParent()
79 UserInfo getUserInfo(int userId); in getUserInfo()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/content/
DSyncManagerTest.java34 import android.content.pm.UserInfo;
198 private UserInfo createUserInfo(String name, int id, int groupId, int flags) { in createUserInfo()
199 final UserInfo ui = new UserInfo(id, name, flags | UserInfo.FLAG_INITIALIZED); in createUserInfo()
215 private void mockUserProperties(UserInfo primaryUserInfo, UserInfo cloneUserInfo) { in mockUserProperties()
226 UserInfo primaryUserInfo = createUserInfo("primary", 0 /* id */, 0 /* groupId */, in testShouldDisableSync()
227 UserInfo.FLAG_PRIMARY | UserInfo.FLAG_ADMIN); in testShouldDisableSync()
228 UserInfo cloneUserInfo = createUserInfo("clone", 10 /* id */, 0 /* groupId */, in testShouldDisableSync()
229 UserInfo.FLAG_PROFILE); in testShouldDisableSync()
/frameworks/base/services/core/java/com/android/server/pm/
DUserTypeDetails.java24 import android.content.pm.UserInfo;
25 import android.content.pm.UserInfo.UserInfoFlag;
339 return (mBaseType & UserInfo.FLAG_PROFILE) != 0; in isProfile()
343 return (mBaseType & UserInfo.FLAG_FULL) != 0; in isFull()
347 return (mBaseType & UserInfo.FLAG_SYSTEM) != 0; in isSystem()
380 pw.print(prefix); pw.print("mBaseType: "); pw.println(UserInfo.flagsToString(mBaseType)); in dump()
385 pw.println(UserInfo.flagsToString(mDefaultUserInfoPropertyFlags)); in dump()
622 return (mBaseType & UserInfo.FLAG_PROFILE) != 0; in isProfile()
627 return mBaseType == UserInfo.FLAG_FULL in hasValidBaseType()
628 || mBaseType == UserInfo.FLAG_PROFILE in hasValidBaseType()
[all …]
DUserManagerInternal.java24 import android.content.pm.UserInfo;
130 default void onUserCreated(UserInfo user, @Nullable Object token) {} in onUserCreated()
133 default void onUserRemoved(UserInfo user) {} in onUserRemoved()
279 public abstract @NonNull UserInfo createUserEvenWhenDisallowed( in createUserEvenWhenDisallowed()
280 @Nullable String name, @NonNull String userType, @UserInfo.UserInfoFlag int flags, in createUserEvenWhenDisallowed()
343 public abstract @NonNull List<UserInfo> getUsers(boolean excludeDying); in getUsers()
350 public abstract @NonNull List<UserInfo> getUsers(boolean excludePartial, boolean excludeDying, in getUsers()
403 public abstract @Nullable UserInfo getUserInfo(@UserIdInt int userId); in getUserInfo()
408 public abstract @NonNull UserInfo[] getUserInfos(); in getUserInfos()
DUserManagerService.java82 import android.content.pm.UserInfo;
83 import android.content.pm.UserInfo.UserInfoFlag;
290 UserInfo.FLAG_MANAGED_PROFILE
291 | UserInfo.FLAG_PROFILE
292 | UserInfo.FLAG_EPHEMERAL
293 | UserInfo.FLAG_RESTRICTED
294 | UserInfo.FLAG_GUEST
295 | UserInfo.FLAG_DEMO
296 | UserInfo.FLAG_FULL
297 | UserInfo.FLAG_FOR_TESTING;
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DUserInfoTest.java34 final UserInfo ui = new UserInfo(10, "Test", UserInfo.FLAG_GUEST); in testSimple()
66 final UserInfo ui = new UserInfo(10, "Test", UserInfo.FLAG_GUEST); in testDebug()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DDeletePackageHelperTest.kt23 import android.content.pm.UserInfo
82 whenever(mUserManagerInternal.getUserInfo(1)).thenReturn(UserInfo(1, "test", 0)) in deleteSystemPackageFailsIfNotAdminAndNotProfile()
99 UserInfo(userId, "test", UserInfo.FLAG_PROFILE)) in deleteSystemPackageFailsIfProfileOfNonAdmin()
102 UserInfo(userId, "testparent", 0)) in deleteSystemPackageFailsIfProfileOfNonAdmin()
116 UserInfo(1, "test", UserInfo.FLAG_ADMIN)) in deleteSystemPackageSucceedsIfAdmin()
135 UserInfo(userId, "test", UserInfo.FLAG_PROFILE)) in deleteSystemPackageSucceedsIfProfileOfAdmin()
138 UserInfo(userId, "testparent", UserInfo.FLAG_ADMIN)) in deleteSystemPackageSucceedsIfProfileOfAdmin()
154 whenever(mUserManagerInternal.getUserInfo(1)).thenReturn(UserInfo(1, "test", 0)) in deleteSystemPackageSucceedsIfNotAdminButDeleteSystemAppSpecified()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/settings/
DUserTrackerImplTest.kt24 import android.content.pm.UserInfo in <lambda>()
116 val info = UserInfo(invocation.getArgument<Int>(0), "", UserInfo.FLAG_FULL) in <lambda>()
243 val info = UserInfo(id, "", UserInfo.FLAG_FULL) in <lambda>()
244 val infoProfile = UserInfo( in <lambda>()
248 UserInfo.FLAG_MANAGED_PROFILE, in <lambda>()
269 val info = UserInfo(id, "", UserInfo.FLAG_FULL) in <lambda>()
270 val infoProfile = UserInfo( in <lambda>()
274 UserInfo.FLAG_MANAGED_PROFILE or UserInfo.FLAG_QUIET_MODE, in <lambda>()
295 val info = UserInfo(id, "", UserInfo.FLAG_FULL) in <lambda>()
296 val infoProfile = UserInfo( in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/communal/data/repository/
DCommunalSettingsRepository.kt22 import android.content.pm.UserInfo in <lambda>()
53 fun getEnabledState(user: UserInfo): Flow<CommunalEnabledState> in <lambda>()
59 fun getWidgetCategories(user: UserInfo): Flow<CommunalWidgetCategories> in <lambda>()
62 fun getAllowedByDevicePolicy(user: UserInfo): Flow<Boolean> in <lambda>()
65 fun getBackground(user: UserInfo): Flow<CommunalBackgroundType> in <lambda>()
83 override fun getEnabledState(user: UserInfo): Flow<CommunalEnabledState> { in getEnabledState()
107 override fun getWidgetCategories(user: UserInfo): Flow<CommunalWidgetCategories> = in getWidgetCategories()
123 override fun getAllowedByDevicePolicy(user: UserInfo): Flow<Boolean> = in getAllowedByDevicePolicy()
133 override fun getBackground(user: UserInfo): Flow<CommunalBackgroundType> = in getBackground()
148 private fun getEnabledByUser(user: UserInfo): Flow<Boolean> = in getEnabledByUser()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/settings/
DFakeUserTracker.kt21 import android.content.pm.UserInfo
34 private var _userInfo: UserInfo = mock(),
35 private var _userProfiles: List<UserInfo> = emptyList(),
46 override val userInfo: UserInfo
48 override val userProfiles: List<UserInfo>
66 fun set(userInfos: List<UserInfo>, selectedUserIndex: Int) { in set()
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DUserTracker.kt22 import android.content.pm.UserInfo
47 val userInfo: UserInfo
57 val userProfiles: List<UserInfo>
108 fun onProfilesChanged(profiles: List<@JvmSuppressWildcards UserInfo>) {} in addCallback()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java37 import android.content.pm.UserInfo;
195 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
196 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
223 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
224 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
246 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
247 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
282 UserInfo userInfo = setUpUser(mUserId, new ComponentName[] {mAdmin1}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
283 UserInfo profileInfo = setUpManagedProfile(mProfileId, new ComponentName[] {mAdmin2}); in checkIfKeyguardFeaturesAreDisabled_onlyMatchesParent_profileParentPolicy()
321 private UserInfo setUpUser(int userId, ComponentName[] admins) { in setUpUser()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/pipeline/domain/autoaddable/
DWorkTileAutoAddableTest.kt19 import android.content.pm.UserInfo
20 import android.content.pm.UserInfo.FLAG_DISABLED
21 import android.content.pm.UserInfo.FLAG_FULL
22 import android.content.pm.UserInfo.FLAG_MANAGED_PROFILE
23 import android.content.pm.UserInfo.FLAG_PRIMARY
24 import android.content.pm.UserInfo.FLAG_PROFILE
191 private val USER_INFO_0 = UserInfo(0, "", FLAG_PRIMARY or FLAG_FULL)
192 private val USER_INFO_1 = UserInfo(1, "", FLAG_FULL)
194 UserInfo(10, "", FLAG_PROFILE or FLAG_MANAGED_PROFILE or FLAG_DISABLED)
195 private val USER_INFO_WORK_ENABLED = UserInfo(10, "", FLAG_PROFILE or FLAG_MANAGED_PROFILE)
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/panels/domain/interactor/
DIconLabelVisibilityInteractorTest.kt19 import android.content.pm.UserInfo
86 private val PRIMARY_USER = UserInfo(0, "user 0", UserInfo.FLAG_MAIN)
87 private val ANOTHER_USER = UserInfo(1, "user 1", UserInfo.FLAG_FULL)

12345678910>>...15