Merge "Update API contract PASSWORD_COMPLEXITY_LOW" into sc-dev

This commit is contained in:
Alex Johnston
2021-07-05 08:56:48 +00:00
committed by Android (Google) Code Review

View File

@@ -1605,20 +1605,29 @@ public class DevicePolicyManager {
"android.app.extra.PASSWORD_COMPLEXITY"; "android.app.extra.PASSWORD_COMPLEXITY";
/** /**
* Constant for {@link #getPasswordComplexity()}: no password. * Constant for {@link #getPasswordComplexity()} and
* {@link #setRequiredPasswordComplexity(int)}: no password.
* *
* <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents
* the exact complexity band the password is in.
* When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity
* band which the password must meet.
*/ */
public static final int PASSWORD_COMPLEXITY_NONE = 0; public static final int PASSWORD_COMPLEXITY_NONE = 0;
/** /**
* Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and
* {@link #setRequiredPasswordComplexity(int)}.
* Define the low password complexity band as:
* <ul> * <ul>
* <li>pattern * <li>pattern
* <li>PIN with repeating (4444) or ordered (1234, 4321, 2468) sequences * <li>PIN with repeating (4444) or ordered (1234, 4321, 2468) sequences
* </ul> * </ul>
* *
* <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents
* the exact complexity band the password is in.
* When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity
* band which the password must meet.
* *
* @see #PASSWORD_QUALITY_SOMETHING * @see #PASSWORD_QUALITY_SOMETHING
* @see #PASSWORD_QUALITY_NUMERIC * @see #PASSWORD_QUALITY_NUMERIC
@@ -1626,7 +1635,9 @@ public class DevicePolicyManager {
public static final int PASSWORD_COMPLEXITY_LOW = 0x10000; public static final int PASSWORD_COMPLEXITY_LOW = 0x10000;
/** /**
* Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and
* {@link #setRequiredPasswordComplexity(int)}.
* Define the medium password complexity band as:
* <ul> * <ul>
* <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at * <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at
* least 4 * least 4
@@ -1634,7 +1645,10 @@ public class DevicePolicyManager {
* <li>alphanumeric, length at least 4 * <li>alphanumeric, length at least 4
* </ul> * </ul>
* *
* <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents
* the exact complexity band the password is in.
* When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity
* band which the password must meet.
* *
* @see #PASSWORD_QUALITY_NUMERIC_COMPLEX * @see #PASSWORD_QUALITY_NUMERIC_COMPLEX
* @see #PASSWORD_QUALITY_ALPHABETIC * @see #PASSWORD_QUALITY_ALPHABETIC
@@ -1643,7 +1657,9 @@ public class DevicePolicyManager {
public static final int PASSWORD_COMPLEXITY_MEDIUM = 0x30000; public static final int PASSWORD_COMPLEXITY_MEDIUM = 0x30000;
/** /**
* Constant for {@link #getPasswordComplexity()}: password satisfies one of the following: * Constant for {@link #getPasswordComplexity()} and
* {@link #setRequiredPasswordComplexity(int)}.
* Define the high password complexity band as:
* <ul> * <ul>
* <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at * <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at
* least 8 * least 8
@@ -1651,7 +1667,10 @@ public class DevicePolicyManager {
* <li>alphanumeric, length at least 6 * <li>alphanumeric, length at least 6
* </ul> * </ul>
* *
* <p>Note that these complexity constants are ordered so that higher values are more complex. * <p> When returned from {@link #getPasswordComplexity()}, the constant represents
* the exact complexity band the password is in.
* When passed to {@link #setRequiredPasswordComplexity(int), it sets the minimum complexity
* band which the password must meet.
* *
* @see #PASSWORD_QUALITY_NUMERIC_COMPLEX * @see #PASSWORD_QUALITY_NUMERIC_COMPLEX
* @see #PASSWORD_QUALITY_ALPHABETIC * @see #PASSWORD_QUALITY_ALPHABETIC
@@ -4455,8 +4474,9 @@ public class DevicePolicyManager {
} }
/** /**
* Sets a password complexity requirement for the user's screen lock. * Sets a minimum password complexity requirement for the user's screen lock.
* The complexity level is one of the pre-defined levels. * The complexity level is one of the pre-defined levels, and the user is unable to set a
* password with a lower complexity level.
* *
* <p>Note that when called on a profile which uses an unified challenge with its parent, the * <p>Note that when called on a profile which uses an unified challenge with its parent, the
* complexity would apply to the unified challenge. * complexity would apply to the unified challenge.