DevicePolicyManager.AutoTimePolicy Property

Definition

Returns current auto time policy's state. -or- Called by a device owner, a profile owner for the primary user or a profile owner of an organization-owned managed profile to turn auto time on and off i.

public virtual Android.App.Admin.DevicePolicyManagerAutoTimeStatus AutoTimePolicy { [Android.Runtime.Register("getAutoTimePolicy", "()I", "GetGetAutoTimePolicyHandler", ApiSince=36)] get; [Android.Runtime.Register("setAutoTimePolicy", "(I)V", "GetSetAutoTimePolicy_IHandler", ApiSince=36)] [Android.Runtime.RequiresPermission("android.permission.SET_TIME")] set; }
[<get: Android.Runtime.Register("getAutoTimePolicy", "()I", "GetGetAutoTimePolicyHandler", ApiSince=36)>]
[<set: Android.Runtime.Register("setAutoTimePolicy", "(I)V", "GetSetAutoTimePolicy_IHandler", ApiSince=36)>]
[<set: Android.Runtime.RequiresPermission("android.permission.SET_TIME")>]
member this.AutoTimePolicy : Android.App.Admin.DevicePolicyManagerAutoTimeStatus with get, set

Property Value

One of #AUTO_TIME_ENABLED if enabled, #AUTO_TIME_DISABLED if disabled and #AUTO_TIME_NOT_CONTROLLED_BY_POLICY if it's not controlled by policy.

Attributes

Remarks

Property getter documentation:

Returns current auto time policy's state.

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

Property setter documentation:

Called by a device owner, a profile owner for the primary user or a profile owner of an organization-owned managed profile to turn auto time on and off i.e. Whether time should be obtained automatically from the network or not.

Callers are recommended to use UserManager#DISALLOW_CONFIG_DATE_TIME to prevent the user from changing this setting, that way no user will be able set the date and time zone.

Java documentation for android.app.admin.DevicePolicyManager.setAutoTimePolicy(int).

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