PackageManager.IsPermissionRevokedByPolicy(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.