Udostępnij za pośrednictwem


DevicePolicyManager.PasswordComplexity Property

Definition

Returns how complex the current user's screen lock is.

public virtual Android.App.Admin.PasswordComplexity PasswordComplexity { [Android.Runtime.Register("getPasswordComplexity", "()I", "GetGetPasswordComplexityHandler", ApiSince=29)] get; }
[<get: Android.Runtime.Register("getPasswordComplexity", "()I", "GetGetPasswordComplexityHandler", ApiSince=29)>]
member this.PasswordComplexity : Android.App.Admin.PasswordComplexity

Property Value

Attributes

Remarks

Returns how complex the current user's screen lock is.

Note that when called from a profile which uses an unified challenge with its parent, the screen lock complexity of the parent will be returned.

Apps need the permission#REQUEST_PASSWORD_COMPLEXITY permission to call this method. On Android android.os.Build.VERSION_CODES#S and above, the calling application does not need this permission if it is a device owner or a profile owner.

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

Java documentation for android.app.admin.DevicePolicyManager.getPasswordComplexity().

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