Dela via


AppOpsManager.StartProxyOp(String, Int32, String, String, String) Method

Definition

Report that an application has started executing a long-running operation on behalf of another application when handling an IPC.

[Android.Runtime.Register("startProxyOp", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I", "GetStartProxyOp_Ljava_lang_String_ILjava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=31)]
public virtual int StartProxyOp (string op, int proxiedUid, string proxiedPackageName, string? proxiedAttributionTag, string? message);
[<Android.Runtime.Register("startProxyOp", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I", "GetStartProxyOp_Ljava_lang_String_ILjava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler", ApiSince=31)>]
abstract member StartProxyOp : string * int * string * string * string -> int
override this.StartProxyOp : string * int * string * string * string -> int

Parameters

op
String

The op to note

proxiedUid
Int32

The uid to note the op for null

proxiedPackageName
String

The package name the uid belongs to

proxiedAttributionTag
String

The proxied Context#createAttributionContext attribution tag or null for default attribution

message
String

A message describing the reason the op was noted

Returns

Returns #MODE_ALLOWED if the operation is allowed, or #MODE_IGNORED if it is not allowed and should be silently ignored (without causing the app to crash).

Attributes

Remarks

Report that an application has started executing a long-running operation on behalf of another application when handling an IPC. This function will verify that the calling uid and proxied package name match, and if not, return #MODE_IGNORED.

Java documentation for android.app.AppOpsManager.startProxyOp(java.lang.String, int, java.lang.String, java.lang.String, 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