Home
last modified time | relevance | path

Searched refs:userType (Results 1 – 25 of 64) sorted by relevance

123

/aosp12/frameworks/base/core/java/android/content/pm/
H A DUserInfo.java188 public String userType; field in UserInfo
255 this.userType = userType; in UserInfo()
307 return UserManager.isUserTypeGuest(userType); in isGuest()
312 return UserManager.isUserTypeRestricted(userType); in isRestricted()
321 return UserManager.isUserTypeManagedProfile(userType); in isManagedProfile()
325 return UserManager.isUserTypeCloneProfile(userType); in isCloneProfile()
346 return UserManager.isUserTypeDemo(userType); in isDemo()
424 userType = orig.userType; in UserInfo()
456 + ", type=" + userType in toFullString()
480 dest.writeString8(userType); in writeToParcel()
[all …]
/aosp12/frameworks/base/core/java/android/os/
H A DIUserManager.aidl44 UserInfo createUserWithThrow(in String name, in String userType, int flags); in createUserWithThrow() argument
45 UserInfo preCreateUserWithThrow(in String userType); in preCreateUserWithThrow() argument
46 … UserInfo createProfileForUserWithThrow(in String name, in String userType, int flags, int userId, in createProfileForUserWithThrow() argument
49 String[] getPreInstallableSystemPackages(in String userType); in getPreInstallableSystemPackages() argument
62 boolean canAddMoreProfilesToUser(in String userType, int userId, boolean allowedToRemoveOne); in canAddMoreProfilesToUser() argument
66 boolean isUserOfType(int userId, in String userType); in isUserOfType() argument
107 …UserInfo createProfileForUserEvenWhenDisallowedWithThrow(in String name, in String userType, int f… in createProfileForUserEvenWhenDisallowedWithThrow() argument
H A DUserManager.java1886 return userInfo == null ? "" : userInfo.userType; in getUserType()
2014 public boolean isUserOfType(@NonNull String userType) { in isUserOfType() argument
2016 return mService.isUserOfType(mUserId, userType); in isUserOfType()
2028 return USER_TYPE_PROFILE_MANAGED.equals(userType); in isUserTypeManagedProfile()
2035 public static boolean isUserTypeGuest(String userType) { in isUserTypeGuest() argument
2036 return USER_TYPE_FULL_GUEST.equals(userType); in isUserTypeGuest()
2045 return USER_TYPE_FULL_RESTRICTED.equals(userType); in isUserTypeRestricted()
2052 public static boolean isUserTypeDemo(String userType) { in isUserTypeDemo() argument
2053 return USER_TYPE_FULL_DEMO.equals(userType); in isUserTypeDemo()
2061 return USER_TYPE_PROFILE_CLONE.equals(userType); in isUserTypeCloneProfile()
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/pm/
H A DUserManagerService.java958 if (userType != null && !userType.equals(profile.userType)) { in getProfileIdsLU()
1348 return userType != null && userType.equals(getUserTypeNoChecks(userId)); in isUserOfType()
2373 if (user.userType.equals(userType) in getNumberOfUsersOfType()
2947 + " from " + userInfo.userType in upgradeProfileToTypeLU()
2974 userInfo.userType = newUserType.getName(); in upgradeProfileToTypeLU()
3265 String userType = null; in readUserLP() local
3311 userType = userType != null ? userType.intern() : null; in readUserLP()
3453 @NonNull String userType, in createProfileForUserEvenWhenDisallowedWithThrow() argument
3541 userType = userType.intern(); // Now that we know it's valid, we can intern it. in createUserInternalUncheckedNoTracing()
3966 if (user.info.preCreated && user.info.userType.equals(userType)) { in getPreCreatedUserLU()
[all …]
H A DUserSystemPackageInstaller.java484 return getInstallablePackagesForUserType(mUm.getUserInfo(userId).userType); in getInstallablePackagesForUserId()
494 @Nullable Set<String> getInstallablePackagesForUserType(String userType) { in getInstallablePackagesForUserType() argument
500 || (isImplicitWhitelistSystemMode(mode) && mUm.isUserTypeSubtypeOfSystem(userType)); in getInstallablePackagesForUserType()
501 final Set<String> whitelistedPackages = getWhitelistedPackagesForUserType(userType); in getInstallablePackagesForUserType()
547 @NonNull Set<String> getWhitelistedPackagesForUserType(String userType) { in getWhitelistedPackagesForUserType() argument
548 final long userTypeMask = getUserTypeMask(userType); in getWhitelistedPackagesForUserType()
632 long getUserTypeMask(String userType) { in getUserTypeMask() argument
633 final int userTypeIndex = Arrays.binarySearch(mUserTypes, userType); in getUserTypeMask()
/aosp12/packages/services/Car/service/src/com/android/car/admin/
H A DCarDevicePolicyService.java78 String userType = UserManager.USER_TYPE_FULL_SECONDARY; in createUser() local
86 userType = UserManager.USER_TYPE_FULL_GUEST; in createUser()
90 Slog.d(TAG, "createUser(): invalid userType (" + userType + ") / flags (" in createUser()
99 Slog.d(TAG, "calling createUser(" + UserHelperLite.safeName(name) + "," + userType in createUser()
103 mCarUserService.createUser(name, userType, userInfoFlags, HAL_TIMEOUT_MS, receiver); in createUser()
/aosp12/packages/apps/Dialer/java/com/android/dialer/phonenumbercache/
H A DContactInfo.java61 public @UserType long userType; field in ContactInfo
129 if (userType != other.userType) { in equals()
174 + userType in toString()
/aosp12/packages/apps/Settings/src/com/android/settings/password/
H A DConfirmDeviceCredentialBaseFragment.java240 final int userType = getUserTypeForWipe(); in updateErrorMessage() local
245 final int messageId = getLastTryErrorMessage(userType); in updateErrorMessage()
250 final int messageId = getWipeMessage(userType); in updateErrorMessage()
268 protected abstract int getLastTryErrorMessage(int userType); in getLastTryErrorMessage() argument
270 private int getWipeMessage(int userType) { in getWipeMessage() argument
271 switch (userType) { in getWipeMessage()
279 throw new IllegalArgumentException("Unrecognized user type:" + userType); in getWipeMessage()
/aosp12/packages/apps/Dialer/java/com/android/incallui/
H A DCallerInfo.java105 public @UserType long userType; field in CallerInfo
156 userType = ContactsUtils.USER_TYPE_CURRENT; in CallerInfo()
184 info.userType = ContactsUtils.USER_TYPE_CURRENT; in getCallerInfo()
304 info.userType = ContactsUtils.determineUserType(directoryId, contactId); in getCallerInfo()
308 context, info.lookupKeyOrNull, info.userType, directoryId); in getCallerInfo()
542 .append("\nuserType: " + userType) in toString()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
H A DUserManagerTest.java377 private void createUserWithTypeAndCheckFlags(String userType, in createUserWithTypeAndCheckFlags() argument
379 final UserInfo userInfo = createUser("Name", userType, 0); in createUserWithTypeAndCheckFlags()
380 assertWithMessage("Wrong user type").that(userInfo.userType).isEqualTo(userType); in createUserWithTypeAndCheckFlags()
512 assertThat(userInfo1.userType).isEqualTo(UserManager.USER_TYPE_PROFILE_MANAGED); in testAddManagedProfile()
1088 private UserInfo createUser(String name, String userType, int flags) { in createUser() argument
1089 UserInfo user = mUserManager.createUser(name, userType, flags); in createUser()
1096 private UserInfo createProfileForUser(String name, String userType, int userHandle) { in createProfileForUser() argument
1097 return createProfileForUser(name, userType, userHandle, null); in createProfileForUser()
1100 private UserInfo createProfileForUser(String name, String userType, int userHandle, in createProfileForUser() argument
1103 name, userType, 0, userHandle, disallowedPackages); in createProfileForUser()
[all …]
H A DUserManagerServiceUserInfoTest.java244 private UserInfo createUser(@UserIdInt int userId, @UserInfoFlag int flags, String userType) { in createUser() argument
245 return new UserInfo(userId, "A Name", "A path", flags, userType); in createUser()
269 assertEquals("UserType not preserved", one.userType, two.userType); in assertUserInfoEquals()
H A DUserSystemPackageInstallerTest.java164 final String userType = userTypes.keyAt(i); in testDetermineWhitelistedPackagesForUserTypes() local
167 expectedUserTypeBitSet1 |= mUserSystemPackageInstaller.getUserTypeMask(userType); in testDetermineWhitelistedPackagesForUserTypes()
178 final String userType = userTypes.keyAt(i); in testDetermineWhitelistedPackagesForUserTypes() local
181 expectedUserTypeBitSet3 |= mUserSystemPackageInstaller.getUserTypeMask(userType); in testDetermineWhitelistedPackagesForUserTypes()
/aosp12/packages/services/Car/car-test-lib/src/android/car/test/mocks/
H A DAndroidMockitoHelper.java177 @NonNull String userType, @UserInfoFlag int flags, @UserIdInt int userId) { in mockUmCreateUser() argument
180 .setType(userType) in mockUmCreateUser()
183 when(um.createUser(name, userType, flags)).thenReturn(userInfo); in mockUmCreateUser()
193 @NonNull String userType, @UserInfoFlag int flags, @NonNull RuntimeException e) { in mockUmCreateUser() argument
194 when(um.createUser(name, userType, flags)).thenThrow(e); in mockUmCreateUser()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
H A DAuthCredentialView.java408 @UserType int userType, @Utils.CredentialType int credentialType) { in getLastAttemptBeforeWipeMessageRes()
409 switch (userType) { in getLastAttemptBeforeWipeMessageRes()
417 throw new IllegalArgumentException("Unrecognized user type:" + userType); in getLastAttemptBeforeWipeMessageRes()
460 private static @StringRes int getNowWipingMessageRes(@UserType int userType) { in getNowWipingMessageRes() argument
461 switch (userType) { in getNowWipingMessageRes()
469 throw new IllegalArgumentException("Unrecognized user type:" + userType); in getNowWipingMessageRes()
/aosp12/packages/services/Car/tests/carservice_unit_test/src/com/android/car/user/
H A DCarUserManagerUnitTest.java308 assertThat(newUser.userType).isEqualTo("sweet"); in testCreateUser_withType_success()
359 assertThat(newUser.userType).isEqualTo(UserManager.USER_TYPE_FULL_SECONDARY); in testCreateUser_success()
395 assertThat(newUser.userType).isEqualTo(UserManager.USER_TYPE_FULL_GUEST); in testCreateGuest_success()
618 @NonNull String userType, @UserInfoFlag int flags, in expectServiceCreateUserSucceeds() argument
625 .setName(name).setType(userType).setFlags(flags).build(); in expectServiceCreateUserSucceeds()
628 }).when(mService).createUser(eq(name), eq(userType), eq(flags), anyInt(), notNull()); in expectServiceCreateUserSucceeds()
632 @NonNull String userType, @UserInfoFlag int flags) throws RemoteException { in expectServiceCreateUserFails() argument
634 .createUser(eq(name), eq(userType), eq(flags), anyInt(), notNull()); in expectServiceCreateUserFails()
H A DUserPreCreatorTest.java173 String userType = in verifyUserCreated() local
175 verify(mUserManager).preCreateUser(eq(userType)); in verifyUserCreated()
/aosp12/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
H A DAbstractICarServiceHelperStub.java73 public UserInfo createUserEvenWhenDisallowed(String name, String userType, int flags) { in createUserEvenWhenDisallowed() argument
74 Log.d(TAG, "createUserEvenWhenDisallowed(name=" + name + ", userType=" + userType in createUserEvenWhenDisallowed()
/aosp12/frameworks/base/telecomm/java/android/telecom/
H A DCallerInfo.java132 public long userType; field in CallerInfo
195 userType = USER_TYPE_CURRENT; in CallerInfo()
217 info.userType = USER_TYPE_CURRENT; in getCallerInfo()
271 info.userType = USER_TYPE_WORK; in getCallerInfo()
772 .append("\nuserType " + userType) in toString()
/aosp12/packages/services/Car/tests/carservice_unit_test/src/com/android/car/admin/
H A DCarDevicePolicyServiceTest.java105 @CarDevicePolicyManager.UserType int carDpmUserType, @NonNull String userType) { in createUserOkTest() argument
108 verify(mCarUserService).createUser(eq("name"), eq(userType), eq(flags), in createUserOkTest()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/keyguard/
H A DKeyguardSecurityContainerController.java542 int userType = USER_TYPE_PRIMARY; in reportFailedUnlockAttempt() local
546 userType = USER_TYPE_SECONDARY_USER; in reportFailedUnlockAttempt()
549 userType = USER_TYPE_WORK_PROFILE; in reportFailedUnlockAttempt()
552 mView.showAlmostAtWipeDialog(failedAttempts, remainingBeforeWipe, userType); in reportFailedUnlockAttempt()
556 mView.showWipeDialog(failedAttempts, userType); in reportFailedUnlockAttempt()
H A DKeyguardSecurityContainer.java732 void showAlmostAtWipeDialog(int attempts, int remaining, int userType) { in showAlmostAtWipeDialog() argument
734 switch (userType) { in showAlmostAtWipeDialog()
751 void showWipeDialog(int attempts, int userType) { in showWipeDialog() argument
753 switch (userType) { in showWipeDialog()
/aosp12/packages/apps/Settings/src/com/android/settings/users/
H A DUserSettings.java474 private void onAddUserClicked(int userType) { in onAddUserClicked() argument
477 switch (userType) { in onAddUserClicked()
717 private Dialog buildAddUserDialog(int userType) {
725 getString(userType == USER_TYPE_USER
731 addUserNow(userType);
800 private void addUserNow(final int userType) {
803 mAddingUserName = userType == USER_TYPE_USER
823 if (userType == USER_TYPE_USER) {
844 if (userType == USER_TYPE_USER) {
/aosp12/packages/services/Car/service/src/com/android/car/user/
H A DCarUserService.java1369 UserInfo createUserEvenWhenDisallowed(@Nullable String name, @NonNull String userType, in createUserEvenWhenDisallowed() argument
1380 + userType + ", " + UserInfo.flagsToString(flags) + ") failed", e); in createUserEvenWhenDisallowed()
1401 Objects.requireNonNull(userType, "user type cannot be null"); in createUser()
1405 UserHelperLite.safeName(name), userType, flags, timeoutMs, in createUser()
1407 mHandler.post(() -> handleCreateUser(name, userType, flags, timeoutMs, receiver, in createUser()
1412 private void handleCreateUser(@Nullable String name, @NonNull String userType, in handleCreateUser() argument
1422 switch (userType) { in handleCreateUser()
1435 Slog.d(TAG, "Invalid combination of user type(" + userType in handleCreateUser()
1459 newUser = mUserManager.createUser(name, userType, flags); in handleCreateUser()
1461 Slog.w(TAG, "um.createUser() returned null for user of type " + userType in handleCreateUser()
[all …]
H A DUserPreCreator.java179 String userType = in preCreateUsers() local
183 user = mUserManager.preCreateUser(userType); in preCreateUsers()
/aosp12/packages/services/Car/car-internal-lib/src/com/android/car/internal/
H A DICarServiceHelper.aidl58 UserInfo createUserEvenWhenDisallowed(String name, String userType, int flags); in createUserEvenWhenDisallowed() argument

123