Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf3f189a authored by Sarup Dalwani's avatar Sarup Dalwani Committed by Android (Google) Code Review
Browse files

Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent" into tm-dev

parents 29037c03 61321ebc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9822,7 +9822,7 @@ package android.os {
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean hasUserRestrictionForUser(@NonNull String, @NonNull android.os.UserHandle);
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS, android.Manifest.permission.QUERY_USERS}) public boolean isAdminUser();
    method public boolean isCloneProfile();
    method public boolean isCredentialSharedWithParent();
    method public boolean isCredentialSharableWithParent();
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS, android.Manifest.permission.QUERY_USERS}) public boolean isGuestUser();
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.QUERY_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isManagedProfile(int);
    method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isMediaSharedWithParent();
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ interface IUserManager {
    boolean someUserHasAccount(in String accountName, in String accountType);
    String getProfileType(int userId);
    boolean isMediaSharedWithParent(int userId);
    boolean isCredentialSharedWithParent(int userId);
    boolean isCredentialSharableWithParent(int userId);
    boolean isDemoUser(int userId);
    boolean isPreCreated(int userId);
    UserInfo createProfileForUserEvenWhenDisallowedWithThrow(in String name, in String userType, int flags,
+3 −3
Original line number Diff line number Diff line
@@ -4763,7 +4763,7 @@ public class UserManager {
    }

    /**
     * Returns {@code true} if the user shares lock settings credential with its parent user
     * Returns whether the user can have shared lockscreen credential with its parent user.
     *
     * This API only works for {@link UserManager#isProfile() profiles}
     * and will always return false for any other user type.
@@ -4776,9 +4776,9 @@ public class UserManager {
                    Manifest.permission.MANAGE_USERS,
                    Manifest.permission.INTERACT_ACROSS_USERS})
    @SuppressAutoDoc
    public boolean isCredentialSharedWithParent() {
    public boolean isCredentialSharableWithParent() {
        try {
            return mService.isCredentialSharedWithParent(mUserId);
            return mService.isCredentialSharableWithParent(mUserId);
        } catch (RemoteException re) {
            throw re.rethrowFromSystemServer();
        }
+4 −4
Original line number Diff line number Diff line
@@ -808,7 +808,7 @@ public class LockPatternUtils {
     */
    public void setSeparateProfileChallengeEnabled(int userHandle, boolean enabled,
            LockscreenCredential profilePassword) {
        if (!isCredentialSharedWithParent(userHandle)) {
        if (!isCredentialSharableWithParent(userHandle)) {
            return;
        }
        try {
@@ -824,7 +824,7 @@ public class LockPatternUtils {
     * Returns true if {@code userHandle} is a managed profile with separate challenge.
     */
    public boolean isSeparateProfileChallengeEnabled(int userHandle) {
        return isCredentialSharedWithParent(userHandle) && hasSeparateChallenge(userHandle);
        return isCredentialSharableWithParent(userHandle) && hasSeparateChallenge(userHandle);
    }

    /**
@@ -849,8 +849,8 @@ public class LockPatternUtils {
        return info != null && info.isManagedProfile();
    }

    private boolean isCredentialSharedWithParent(int userHandle) {
        return getUserManager(userHandle).isCredentialSharedWithParent();
    private boolean isCredentialSharableWithParent(int userHandle) {
        return getUserManager(userHandle).isCredentialSharableWithParent();
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -2618,7 +2618,7 @@ class UserController implements Handler.Callback {
        if (getStartedUserState(userId) == null) {
            return false;
        }
        if (!mInjector.getUserManager().isCredentialSharedWithParent(userId)) {
        if (!mInjector.getUserManager().isCredentialSharableWithParent(userId)) {
            return false;
        }
        if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId)) {
Loading