Partager via


AppOpsManager.IOnOpChangedListener.OnOpChanged2 Method

Definition

Similar to #onOpChanged(String, String, int) but includes the device for which the op mode has changed.

[Android.Runtime.Register("onOpChanged", "(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V", "GetOnOpChanged2_Ljava_lang_String_Ljava_lang_String_ILjava_lang_String_Handler:Android.App.AppOpsManager/IOnOpChangedListener, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual void OnOpChanged2 (string op, string packageName, int userId, string persistentDeviceId);
[<Android.Runtime.Register("onOpChanged", "(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V", "GetOnOpChanged2_Ljava_lang_String_Ljava_lang_String_ILjava_lang_String_Handler:Android.App.AppOpsManager/IOnOpChangedListener, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member OnOpChanged2 : string * string * int * string -> unit
override this.OnOpChanged2 : string * string * int * string -> unit

Parameters

op
String

The Op that changed.

packageName
String

Package of the app whose Op changed.

userId
Int32

User id of the app whose Op changed.

persistentDeviceId
String

persistent device id whose Op changed.

Attributes

Remarks

Similar to #onOpChanged(String, String, int) but includes the device for which the op mode has changed.

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

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

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