diff options
| author | Adrian Roos <roosa@google.com> | 2014-11-20 23:55:34 +0100 |
|---|---|---|
| committer | Adrian Roos <roosa@google.com> | 2014-11-21 13:34:06 +0100 |
| commit | f8f56bce428bb2b89d1d572ccd2d604761dbbce8 (patch) | |
| tree | 34b6fc8c2a48584936a3514efa318d6d5a099229 /core/java/android | |
| parent | 481a6df99fea124bc4354da34ff668750cdc9041 (diff) | |
Fix DPM.resetPassword("")
While we're at it, also fix some multi-user issues in
LockPatternUtils.
Bug: 17496766
Change-Id: I8e557ea640fa589817c8f8f818c91463585d5ea7
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index ad1cf44efa38..f510a0c28dcd 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -1363,13 +1363,16 @@ public class DevicePolicyManager { * characters when the requested quality is only numeric), in which case * the currently active quality will be increased to match. * + * <p>Calling with a null or empty password will clear any existing PIN, + * pattern or password if the current password constraints allow it. + * * <p>The calling device admin must have requested * {@link DeviceAdminInfo#USES_POLICY_RESET_PASSWORD} to be able to call * this method; if it has not, a security exception will be thrown. * * <p>Calling this from a managed profile will throw a security exception. * - * @param password The new password for the user. + * @param password The new password for the user. Null or empty clears the password. * @param flags May be 0 or {@link #RESET_PASSWORD_REQUIRE_ENTRY}. * @return Returns true if the password was applied, or false if it is * not acceptable for the current constraints. |
