summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java40
1 files changed, 30 insertions, 10 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 8284cdde3d06..6bc331d323ac 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -1605,20 +1605,29 @@ public class DevicePolicyManager {
"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;
/**
- * 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>
* <li>pattern
* <li>PIN with repeating (4444) or ordered (1234, 4321, 2468) sequences
* </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_NUMERIC
@@ -1626,7 +1635,9 @@ public class DevicePolicyManager {
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>
* <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at
* least 4
@@ -1634,7 +1645,10 @@ public class DevicePolicyManager {
* <li>alphanumeric, length at least 4
* </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_ALPHABETIC
@@ -1643,7 +1657,9 @@ public class DevicePolicyManager {
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>
* <li>PIN with <b>no</b> repeating (4444) or ordered (1234, 4321, 2468) sequences, length at
* least 8
@@ -1651,7 +1667,10 @@ public class DevicePolicyManager {
* <li>alphanumeric, length at least 6
* </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_ALPHABETIC
@@ -4455,8 +4474,9 @@ public class DevicePolicyManager {
}
/**
- * Sets a password complexity requirement for the user's screen lock.
- * The complexity level is one of the pre-defined levels.
+ * Sets a minimum password complexity requirement for the user's screen lock.
+ * 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
* complexity would apply to the unified challenge.