Partager via


ContextWrapper.EnforceCallingOrSelfUriPermission Method

Definition

If the calling process of an IPC or you has not been granted permission to access a specific URI, throw SecurityException.

[Android.Runtime.Register("enforceCallingOrSelfUriPermission", "(Landroid/net/Uri;ILjava/lang/String;)V", "GetEnforceCallingOrSelfUriPermission_Landroid_net_Uri_ILjava_lang_String_Handler")]
public override void EnforceCallingOrSelfUriPermission (Android.Net.Uri? uri, Android.Content.ActivityFlags modeFlags, string? message);
[<Android.Runtime.Register("enforceCallingOrSelfUriPermission", "(Landroid/net/Uri;ILjava/lang/String;)V", "GetEnforceCallingOrSelfUriPermission_Landroid_net_Uri_ILjava_lang_String_Handler")>]
override this.EnforceCallingOrSelfUriPermission : Android.Net.Uri * Android.Content.ActivityFlags * string -> unit

Parameters

uri
Uri

The uri that is being checked.

modeFlags
ActivityFlags

The type of access to grant. May be one or both of GrantReadUriPermission or GrantWriteUriPermission.

message
String

A message to include in the exception if it is thrown.

Attributes

Remarks

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