Android.Test.Mock.MockContext.EnforceUriPermission Method
Enforce both a Uri and normal permission.

Syntax

[Android.Runtime.Register("enforceUriPermission", "(Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;)V", "GetEnforceUriPermission_Landroid_net_Uri_Ljava_lang_String_Ljava_lang_String_IIILjava_lang_String_Handler")]
public override void EnforceUriPermission (Android.Net.Uri uri, string readPermission, string writePermission, int pid, int uid, [Android.Runtime.GeneratedEnum] Android.Content.ActivityFlags modeFlags, string message)

Parameters

uri
The Uri whose permission is to be checked, or null to not do this check.
readPermission
The permission that provides overall read access, or null to not do this check.
writePermission
The permission that provides overall write access, or null to not do this check.
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.
modeFlags
The type of access to grant. May be one or both of Android.Content.Intent.FLAG_GRANT_READ_URI_PERMISSION or Android.Content.Intent.FLAG_GRANT_WRITE_URI_PERMISSION.
message
A message to include in the exception if it is thrown.

Remarks

Requirements

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