summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Johnston <acjohnston@google.com> 2021-07-05 09:27:28 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-07-05 09:27:28 +0000
commitf5fd0b2c776bd0c7aa073b5fdb34908ea9ab23dd (patch)
tree50a604461abdda5619f5d2776f277fbff248b456
parenteba8ce21876bb071a63ca30b5712dffd7ad873b8 (diff)
parent8a0289694d00640509d41b0e1f91c3e5cb121aa6 (diff)
Merge "Update API contract PASSWORD_COMPLEXITY_LOW" into sc-dev am: 61a9cafe83 am: 8a0289694d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156192 Change-Id: I7ff1868aa5523c064f2d25b76b2dc6502df9fbf9
-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.