Android.Content.ContextWrapper.EnforcePermission Method
If the given permission is not allowed for a particular process and user ID running in the system, throw a Java.Lang.SecurityException.

Syntax

[Android.Runtime.Register("enforcePermission", "(Ljava/lang/String;IILjava/lang/String;)V", "GetEnforcePermission_Ljava_lang_String_IILjava_lang_String_Handler")]
public override void EnforcePermission (string permission, int pid, int uid, string message)

Parameters

permission
The name of the permission being checked.
pid
The process ID being checked against. Must be > 0.
uid
The user ID being checked against. A uid of 0 is the root user, which will pass every permission check.
message
A message to include in the exception if it is thrown.

Remarks

If the given permission is not allowed for a particular process and user ID running in the system, throw a Java.Lang.SecurityException.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1