Compartilhar via


MockContext.EnforceCallingUriPermission(Uri, ActivityFlags, String) Method

Definition

If the calling process and user ID has not been granted permission to access a specific URI, throw SecurityException.

[Android.Runtime.Register("enforceCallingUriPermission", "(Landroid/net/Uri;ILjava/lang/String;)V", "GetEnforceCallingUriPermission_Landroid_net_Uri_ILjava_lang_String_Handler")]
public override void EnforceCallingUriPermission (Android.Net.Uri? uri, Android.Content.ActivityFlags modeFlags, string? message);
[<Android.Runtime.Register("enforceCallingUriPermission", "(Landroid/net/Uri;ILjava/lang/String;)V", "GetEnforceCallingUriPermission_Landroid_net_Uri_ILjava_lang_String_Handler")>]
override this.EnforceCallingUriPermission : 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