次の方法で共有


MockContext.CheckPermission(String, Int32, Int32) Method

Definition

Determine whether the given permission is allowed for a particular process and user ID running in the system.

[Android.Runtime.Register("checkPermission", "(Ljava/lang/String;II)I", "GetCheckPermission_Ljava_lang_String_IIHandler")]
public override Android.Content.PM.Permission CheckPermission (string? permission, int pid, int uid);
[<Android.Runtime.Register("checkPermission", "(Ljava/lang/String;II)I", "GetCheckPermission_Ljava_lang_String_IIHandler")>]
override this.CheckPermission : string * int * int -> Android.Content.PM.Permission

Parameters

permission
String

The name of the permission being checked.

pid
Int32

The process ID being checked against. Must be > 0.

uid
Int32

The user ID being checked against. A uid of 0 is the root user, which will pass every permission check.

Returns

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