DevicePolicyManager.CreateAdminSupportIntent(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当管理员禁用某个功能时,由任何应用调用以显示支持对话框。
[Android.Runtime.Register("createAdminSupportIntent", "(Ljava/lang/String;)Landroid/content/Intent;", "GetCreateAdminSupportIntent_Ljava_lang_String_Handler", ApiSince=26)]
public virtual Android.Content.Intent? CreateAdminSupportIntent (string restriction);
[<Android.Runtime.Register("createAdminSupportIntent", "(Ljava/lang/String;)Landroid/content/Intent;", "GetCreateAdminSupportIntent_Ljava_lang_String_Handler", ApiSince=26)>]
abstract member CreateAdminSupportIntent : string -> Android.Content.Intent
override this.CreateAdminSupportIntent : string -> Android.Content.Intent
参数
- restriction
- String
指示应显示对话框的功能。 可以是用户限制UserManager
,例如UserManager#DISALLOW_ADJUST_VOLUME
,或常量#POLICY_DISABLE_CAMERA
之一。#POLICY_DISABLE_SCREEN_CAPTURE
返回
意向:如果限制由管理员设置,则用于启动对话活动的意向;如果限制不存在或管理员未设置该限制,则为 null。
- 属性
注解
当管理员禁用某个功能时,由任何应用调用以显示支持对话框。这会返回可用于 Context#startActivity(Intent)
显示对话框的意向。 它将告知用户 restriction
管理员已禁用该功能,并包含详细信息的链接。 对话框的默认内容可以通过限制管理员更改 #setShortSupportMessage(ComponentName, CharSequence)
。 如果未设置限制(即该功能可用),则返回值将为 null
。
适用于 . 的 android.app.admin.DevicePolicyManager.createAdminSupportIntent(java.lang.String)
Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。