Language

MockContext.CheckSelfPermission(String) Method

Definition

Throws UnsupportedOperationException. Override this method to check this application's permission in a test.

[Android.Runtime.Register("checkSelfPermission", "(Ljava/lang/String;)I", "GetCheckSelfPermission_Ljava_lang_String_Handler", ApiSince=23)]
public override Android.Content.PM.Permission CheckSelfPermission(string? permission);
[<Android.Runtime.Register("checkSelfPermission", "(Ljava/lang/String;)I", "GetCheckSelfPermission_Ljava_lang_String_Handler", ApiSince=23)>]
override this.CheckSelfPermission : string -> Android.Content.PM.Permission

Parameters

permission
String

The permission name to check. Available to a test override; the default mock implementation does not use this argument.

Returns

No value is returned. The default mock implementation throws UnsupportedOperationException; override this method to supply a test result.

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