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

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

Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent"

parents 91184376 ece66c41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9820,7 +9820,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 −6
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
@@ -47,7 +46,6 @@ import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.IStorageManager;
import android.os.storage.StorageManager;
import android.provider.Settings;
import android.text.TextUtils;
@@ -794,7 +792,7 @@ public class LockPatternUtils {
     */
    public void setSeparateProfileChallengeEnabled(int userHandle, boolean enabled,
            LockscreenCredential profilePassword) {
        if (!isCredentialSharedWithParent(userHandle)) {
        if (!isCredentialSharableWithParent(userHandle)) {
            return;
        }
        try {
@@ -810,7 +808,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);
    }

    /**
@@ -835,8 +833,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