Udostępnij za pośrednictwem


AppOpsManager.IOnOpActiveChangedListener.OnOpActiveChanged2 Method

Definition

Similar to #onOpActiveChanged(String, int, String, String, boolean, int, int), but also includes the virtual device id of the op is now active or inactive.

[Android.Runtime.Register("onOpActiveChanged", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;IZII)V", "GetOnOpActiveChanged2_Ljava_lang_String_ILjava_lang_String_Ljava_lang_String_IZIIHandler:Android.App.AppOpsManager/IOnOpActiveChangedListener, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual void OnOpActiveChanged2 (string op, int uid, string packageName, string? attributionTag, int virtualDeviceId, bool active, int attributionFlags, int attributionChainId);
[<Android.Runtime.Register("onOpActiveChanged", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;IZII)V", "GetOnOpActiveChanged2_Ljava_lang_String_ILjava_lang_String_Ljava_lang_String_IZIIHandler:Android.App.AppOpsManager/IOnOpActiveChangedListener, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member OnOpActiveChanged2 : string * int * string * string * int * bool * int * int -> unit
override this.OnOpActiveChanged2 : string * int * string * string * int * bool * int * int -> unit

Parameters

op
String

The operation that changed.

uid
Int32

The UID performing the operation.

packageName
String

The package performing the operation.

attributionTag
String

The operation's attribution tag.

virtualDeviceId
Int32

the virtual device id whose operation has changed

active
Boolean

Whether the operation became active or inactive.

attributionFlags
Int32

the attribution flags for this operation.

attributionChainId
Int32

the unique id of the attribution chain this op is a part of.

Attributes

Remarks

Similar to #onOpActiveChanged(String, int, String, String, boolean, int, int), but also includes the virtual device id of the op is now active or inactive.

Implement this method if callbacks are required on all devices. If not implemented explicitly, the default implementation will notify for op state changes on the default device Context#DEVICE_ID_DEFAULT only.

If implemented, #onOpActiveChanged(String, int, String, String, boolean, int, int) will not be called automatically.

Java documentation for android.app.AppOpsManager.OnOpActiveChangedListener.onOpActiveChanged(java.lang.String, int, java.lang.String, java.lang.String, int, boolean, int, int).

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