diff options
author | 2021-07-05 09:27:08 +0000 | |
---|---|---|
committer | 2021-07-05 09:27:08 +0000 | |
commit | f474a43a8d3624a4dc13f2a3b0a934f003bc1b7d (patch) | |
tree | 50a604461abdda5619f5d2776f277fbff248b456 | |
parent | eba8ce21876bb071a63ca30b5712dffd7ad873b8 (diff) | |
parent | 540cfa9bbf036fd4f89f02391c0c6d09c4d0dc3b (diff) |
Merge "Update API contract PASSWORD_COMPLEXITY_LOW" into sc-dev am: 61a9cafe83 am: 540cfa9bbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156192
Change-Id: I14eb93f7c0ce76230d791b66ea13d7345db33fc4
-rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 40 |
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. |