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

Commit f28b2dd9 authored by Sarup Dalwani's avatar Sarup Dalwani Committed by Automerger Merge Worker
Browse files

Merge "Renaming isCredentialSharedWithParent to...

Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent" into tm-dev am: bf3f189a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17106010

Change-Id: I7f2fec84f4218e917960b4f6506f050f6afdb585
parents bda118aa bf3f189a
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