DevicePolicyManager.GetApplicationRestrictions(ComponentName, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索在调用用户中运行的给定目标应用程序的应用程序限制。
[Android.Runtime.Register("getApplicationRestrictions", "(Landroid/content/ComponentName;Ljava/lang/String;)Landroid/os/Bundle;", "GetGetApplicationRestrictions_Landroid_content_ComponentName_Ljava_lang_String_Handler")]
public virtual Android.OS.Bundle GetApplicationRestrictions(Android.Content.ComponentName? admin, string? packageName);
[<Android.Runtime.Register("getApplicationRestrictions", "(Landroid/content/ComponentName;Ljava/lang/String;)Landroid/os/Bundle;", "GetGetApplicationRestrictions_Landroid_content_ComponentName_Ljava_lang_String_Handler")>]
abstract member GetApplicationRestrictions : Android.Content.ComponentName * string -> Android.OS.Bundle
override this.GetApplicationRestrictions : Android.Content.ComponentName * string -> Android.OS.Bundle
参数
- admin
- ComponentName
DeviceAdminReceiver此请求与哪个请求相关联,或者null应用程序限制管理包是否调用。
- packageName
- String
要提取其受限设置的包的名称。
返回
Bundle 与上次 DevicePolicyManager#setApplicationRestrictions 调用时所设置的设置对应的设置,如果未设置任何限制,则为空 Bundle 。
- 特性
注解
检索在调用用户中运行的给定目标应用程序的应用程序限制。
调用方必须是该用户的配置文件或设备所有者,或者允许通过 #setDelegatedScopes 范围管理应用程序限制的 #DELEGATION_APP_RESTRICTIONS 包;否则将引发安全异常。
注意:此方法执行磁盘 I/O,不应在主线程上调用
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。