DevicePolicyManager.SetAutoTimeZoneEnabled(ComponentName, Boolean) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
由设备所有者、主要用户或组织拥有的托管配置文件的配置文件所有者的配置文件所有者调用,以打开和关闭自动时区。
[Android.Runtime.Register("setAutoTimeZoneEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetAutoTimeZoneEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.SET_TIME_ZONE")]
public virtual void SetAutoTimeZoneEnabled(Android.Content.ComponentName? admin, bool enabled);
[<Android.Runtime.Register("setAutoTimeZoneEnabled", "(Landroid/content/ComponentName;Z)V", "GetSetAutoTimeZoneEnabled_Landroid_content_ComponentName_ZHandler", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.SET_TIME_ZONE")>]
abstract member SetAutoTimeZoneEnabled : Android.Content.ComponentName * bool -> unit
override this.SetAutoTimeZoneEnabled : Android.Content.ComponentName * bool -> unit
参数
- admin
- ComponentName
DeviceAdminReceiver如果调用方不是设备管理员,则此请求与此请求相关联或为 Null。
- enabled
- Boolean
是否应从网络自动获取时区。
- 特性
注解
由设备所有者、主要用户或组织拥有的托管配置文件的配置文件所有者的配置文件所有者调用,以打开和关闭自动时区。
建议使用 UserManager#DISALLOW_CONFIG_DATE_TIME 呼叫者来防止用户更改此设置,这样用户将无法设置日期和时间区域。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。