Loading core/java/android/app/admin/DevicePolicyManager.java +0 −21 Original line number Diff line number Diff line Loading @@ -4572,27 +4572,6 @@ public class DevicePolicyManager { return true; } /** * Determine whether the current profile password the user has set is sufficient * to meet the policy requirements (e.g. quality, minimum length) that have been * requested by the admins of the parent user and its profiles. * * @param userHandle the userId of the profile to check the password for. * @return Returns true if the password would meet the current requirements, else false. * @throws SecurityException if {@code userHandle} is not a managed profile. * @hide */ public boolean isProfileActivePasswordSufficientForParent(int userHandle) { if (mService != null) { try { return mService.isProfileActivePasswordSufficientForParent(userHandle); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return false; } /** * Returns whether the given user's credential will be sufficient for all password policy * requirement, once the user's profile has switched to unified challenge. Loading core/java/android/app/admin/IDevicePolicyManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ interface IDevicePolicyManager { boolean isActivePasswordSufficient(int userHandle, boolean parent); boolean isActivePasswordSufficientForDeviceRequirement(); boolean isProfileActivePasswordSufficientForParent(int userHandle); boolean isPasswordSufficientAfterProfileUnification(int userHandle, int profileUser); int getPasswordComplexity(boolean parent); void setRequiredPasswordComplexity(int passwordComplexity, boolean parent); Loading core/java/com/android/internal/widget/LockPatternUtils.java +0 −10 Original line number Diff line number Diff line Loading @@ -854,16 +854,6 @@ public class LockPatternUtils { && getDevicePolicyManager().isSeparateProfileChallengeAllowed(userHandle); } /** * Retrieves whether the current profile and device locks can be unified. * @param userHandle profile user handle. */ public boolean isSeparateProfileChallengeAllowedToUnify(int userHandle) { return getDevicePolicyManager().isProfileActivePasswordSufficientForParent(userHandle) && !getUserManager().hasUserRestriction( UserManager.DISALLOW_UNIFIED_PASSWORD, UserHandle.of(userHandle)); } private boolean hasSeparateChallenge(int userHandle) { try { return getLockSettings().getSeparateProfileChallengeEnabled(userHandle); Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −24 Original line number Diff line number Diff line Loading @@ -4546,30 +4546,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return !isSeparateProfileChallengeEnabled(caller.getUserId()); } @Override public boolean isProfileActivePasswordSufficientForParent(int userHandle) { if (!mHasFeature) { return true; } Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId"); final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)); Preconditions.checkCallAuthorization(isManagedProfile(userHandle), "can not call APIs refering to the parent profile outside a managed profile, " + "userId = %d", userHandle); synchronized (getLockObject()) { final int targetUser = getProfileParentId(userHandle); enforceUserUnlocked(targetUser, false); int credentialOwner = getCredentialOwner(userHandle, false); DevicePolicyData policy = getUserDataUnchecked(credentialOwner); PasswordMetrics metrics = mLockSettingsInternal.getUserPasswordMetrics(credentialOwner); return isActivePasswordSufficientForUserLocked( policy.mPasswordValidAtLastCheckpoint, metrics, targetUser); } } @Override public boolean isPasswordSufficientAfterProfileUnification(int userHandle, int profileUser) { if (!mHasFeature) { Loading Loading
core/java/android/app/admin/DevicePolicyManager.java +0 −21 Original line number Diff line number Diff line Loading @@ -4572,27 +4572,6 @@ public class DevicePolicyManager { return true; } /** * Determine whether the current profile password the user has set is sufficient * to meet the policy requirements (e.g. quality, minimum length) that have been * requested by the admins of the parent user and its profiles. * * @param userHandle the userId of the profile to check the password for. * @return Returns true if the password would meet the current requirements, else false. * @throws SecurityException if {@code userHandle} is not a managed profile. * @hide */ public boolean isProfileActivePasswordSufficientForParent(int userHandle) { if (mService != null) { try { return mService.isProfileActivePasswordSufficientForParent(userHandle); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return false; } /** * Returns whether the given user's credential will be sufficient for all password policy * requirement, once the user's profile has switched to unified challenge. Loading
core/java/android/app/admin/IDevicePolicyManager.aidl +0 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ interface IDevicePolicyManager { boolean isActivePasswordSufficient(int userHandle, boolean parent); boolean isActivePasswordSufficientForDeviceRequirement(); boolean isProfileActivePasswordSufficientForParent(int userHandle); boolean isPasswordSufficientAfterProfileUnification(int userHandle, int profileUser); int getPasswordComplexity(boolean parent); void setRequiredPasswordComplexity(int passwordComplexity, boolean parent); Loading
core/java/com/android/internal/widget/LockPatternUtils.java +0 −10 Original line number Diff line number Diff line Loading @@ -854,16 +854,6 @@ public class LockPatternUtils { && getDevicePolicyManager().isSeparateProfileChallengeAllowed(userHandle); } /** * Retrieves whether the current profile and device locks can be unified. * @param userHandle profile user handle. */ public boolean isSeparateProfileChallengeAllowedToUnify(int userHandle) { return getDevicePolicyManager().isProfileActivePasswordSufficientForParent(userHandle) && !getUserManager().hasUserRestriction( UserManager.DISALLOW_UNIFIED_PASSWORD, UserHandle.of(userHandle)); } private boolean hasSeparateChallenge(int userHandle) { try { return getLockSettings().getSeparateProfileChallengeEnabled(userHandle); Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +0 −24 Original line number Diff line number Diff line Loading @@ -4546,30 +4546,6 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager { return !isSeparateProfileChallengeEnabled(caller.getUserId()); } @Override public boolean isProfileActivePasswordSufficientForParent(int userHandle) { if (!mHasFeature) { return true; } Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId"); final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)); Preconditions.checkCallAuthorization(isManagedProfile(userHandle), "can not call APIs refering to the parent profile outside a managed profile, " + "userId = %d", userHandle); synchronized (getLockObject()) { final int targetUser = getProfileParentId(userHandle); enforceUserUnlocked(targetUser, false); int credentialOwner = getCredentialOwner(userHandle, false); DevicePolicyData policy = getUserDataUnchecked(credentialOwner); PasswordMetrics metrics = mLockSettingsInternal.getUserPasswordMetrics(credentialOwner); return isActivePasswordSufficientForUserLocked( policy.mPasswordValidAtLastCheckpoint, metrics, targetUser); } } @Override public boolean isPasswordSufficientAfterProfileUnification(int userHandle, int profileUser) { if (!mHasFeature) { Loading