다음을 통해 공유


AppOpsManager.PermissionToOp(String) Method

Definition

Gets the app-op name associated with a given permission.

[Android.Runtime.Register("permissionToOp", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=23)]
public static string? PermissionToOp (string permission);
[<Android.Runtime.Register("permissionToOp", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=23)>]
static member PermissionToOp : string -> string

Parameters

permission
String

The permission.

Returns

The app-op associated with the permission or null.

Attributes

Remarks

Gets the app-op name associated with a given permission.

The app-op name is one of the public constants defined in this class such as #OPSTR_COARSE_LOCATION. This API is intended to be used for mapping runtime permissions to the corresponding app-op.

Java documentation for android.app.AppOpsManager.permissionToOp(java.lang.String).

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