DevicePolicyManager.CurrentFailedPasswordAttempts Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieve the number of times the user has failed at entering a password since that last successful password entry.
public virtual int CurrentFailedPasswordAttempts { [Android.Runtime.Register("getCurrentFailedPasswordAttempts", "()I", "GetGetCurrentFailedPasswordAttemptsHandler")] [Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS")] get; }
[<get: Android.Runtime.Register("getCurrentFailedPasswordAttempts", "()I", "GetGetCurrentFailedPasswordAttemptsHandler")>]
[<get: Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS")>]
member this.CurrentFailedPasswordAttempts : int
Property Value
The number of times user has entered an incorrect password since the last correct password entry.
- Attributes
Remarks
Retrieve the number of times the user has failed at entering a password since that last successful password entry.
This method can be called on the DevicePolicyManager
instance returned by #getParentProfileInstance(ComponentName)
in order to retrieve the number of failed password attemts for the parent user.
The calling device admin must have requested DeviceAdminInfo#USES_POLICY_WATCH_LOGIN
to be able to call this method; if it has not, a security exception will be thrown.
On devices not supporting PackageManager#FEATURE_SECURE_LOCK_SCREEN
feature, the password is always empty and this method always returns 0.
Java documentation for android.app.admin.DevicePolicyManager.getCurrentFailedPasswordAttempts()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.