DevicePolicyManager.GetPasswordExpiration(ComponentName) Method
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.
Get the current password expiration time for a particular admin or all admins that set restrictions on this user and its participating profiles.
[Android.Runtime.Register("getPasswordExpiration", "(Landroid/content/ComponentName;)J", "GetGetPasswordExpiration_Landroid_content_ComponentName_Handler")]
public virtual long GetPasswordExpiration (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("getPasswordExpiration", "(Landroid/content/ComponentName;)J", "GetGetPasswordExpiration_Landroid_content_ComponentName_Handler")>]
abstract member GetPasswordExpiration : Android.Content.ComponentName -> int64
override this.GetPasswordExpiration : Android.Content.ComponentName -> int64
Parameters
- admin
- ComponentName
The name of the admin component to check, or null
to aggregate all admins.
Returns
The password expiration time, in milliseconds since epoch.
- Attributes
Remarks
Get the current password expiration time 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. If admin is null
, then a composite of all expiration times is returned - which will be the minimum of all of them.
This method can be called on the DevicePolicyManager
instance returned by #getParentProfileInstance(ComponentName)
in order to retrieve the password expiration for the parent profile.
On devices not supporting PackageManager#FEATURE_SECURE_LOCK_SCREEN
feature, the password expiration is always disabled and this method always returns 0.
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.