共用方式為


DevicePolicyManager.GetMaximumFailedPasswordsForWipe(ComponentName) Method

Definition

Retrieve the current maximum number of login attempts that are allowed before the device or profile is wiped, for a particular admin or all admins that set restrictions on this user and its participating profiles.

[Android.Runtime.Register("getMaximumFailedPasswordsForWipe", "(Landroid/content/ComponentName;)I", "GetGetMaximumFailedPasswordsForWipe_Landroid_content_ComponentName_Handler")]
public virtual int GetMaximumFailedPasswordsForWipe (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("getMaximumFailedPasswordsForWipe", "(Landroid/content/ComponentName;)I", "GetGetMaximumFailedPasswordsForWipe_Landroid_content_ComponentName_Handler")>]
abstract member GetMaximumFailedPasswordsForWipe : Android.Content.ComponentName -> int
override this.GetMaximumFailedPasswordsForWipe : Android.Content.ComponentName -> int

Parameters

admin
ComponentName

The name of the admin component to check, or null to aggregate all admins.

Returns

Attributes

Remarks

Retrieve the current maximum number of login attempts that are allowed before the device or profile is wiped, for a particular admin or all admins that set restrictions on this user and its participating profiles. Restrictions on profiles that have a separate challenge are not taken into account.

This method can be called on the DevicePolicyManager instance returned by #getParentProfileInstance(ComponentName) in order to retrieve the value for the parent profile.

On devices not supporting PackageManager#FEATURE_SECURE_LOCK_SCREEN feature, the password is always empty and this method returns a default value (0) indicating that the policy is not set.

Java documentation for android.app.admin.DevicePolicyManager.getMaximumFailedPasswordsForWipe(android.content.ComponentName).

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.

Applies to