Android.Content.Context.EnforceCallingOrSelfPermission Method
If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a Java.Lang.SecurityException.

Syntax

[Android.Runtime.Register("enforceCallingOrSelfPermission", "(Ljava/lang/String;Ljava/lang/String;)V", "GetEnforceCallingOrSelfPermission_Ljava_lang_String_Ljava_lang_String_Handler")]
public abstract void EnforceCallingOrSelfPermission (string permission, string message)

See Also

Context.CheckCallingOrSelfPermission(string)

Parameters

permission
The name of the permission being checked.
message
A message to include in the exception if it is thrown.

Remarks

If neither you nor the calling process of an IPC you are handling has been granted a particular permission, throw a Java.Lang.SecurityException. This is the same as Context.EnforceCallingPermission(string, System.String), except it grants your own permissions if you are not currently processing an IPC. Use with care!

[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