PackageManager.IsPermissionRevokedByPolicy(String, String) Method

Definition

Checks whether a particular permissions has been revoked for a package by policy.

[Android.Runtime.Register("isPermissionRevokedByPolicy", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetIsPermissionRevokedByPolicy_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=23)]
public abstract bool IsPermissionRevokedByPolicy (string permName, string packageName);
[<Android.Runtime.Register("isPermissionRevokedByPolicy", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetIsPermissionRevokedByPolicy_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member IsPermissionRevokedByPolicy : string * string -> bool

Parameters

permName
String

The name of the permission you are checking for.

packageName
String

The name of the package you are checking against.

Returns

Whether the permission is restricted by policy.

Attributes

Remarks

Checks whether a particular permissions has been revoked for a package by policy. Typically the device owner or the profile owner may apply such a policy. The user cannot grant policy revoked permissions, hence the only way for an app to get such a permission is by a policy change.

Java documentation for android.content.pm.PackageManager.isPermissionRevokedByPolicy(java.lang.String, java.lang.String).

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