- admin
- Which Android.App.Admin.DeviceAdminReceiver this request is associated with.
- quality
- The new desired quality. One of DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, DevicePolicyManager.PASSWORD_QUALITY_NUMERIC, DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX, DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC, DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC or DevicePolicyManager.PASSWORD_QUALITY_COMPLEX.
Called by an application that is administering the device to set the password restrictions it is imposing. After setting this, the user will not be able to enter a new password that is not at least as restrictive as what has been set. Note that the current password will remain until the user has set a new one, so the change does not take place immediately. To prompt the user for a new password, use DevicePolicyManager.ActionSetNewPassword after setting this value.
Quality constants are ordered so that higher values are more restrictive; thus the highest requested quality constant (between the policy set here, the user's preference, and any other considerations) is the one that is in effect.
The calling device admin must have requested DeviceAdminInfo.UsesPolicyLimitPassword to be able to call this method; if it has not, a security exception will be thrown.