TokenWatcher.Acquire(IBinder, String) Method

Definition

Record that this token has been acquired.

[Android.Runtime.Register("acquire", "(Landroid/os/IBinder;Ljava/lang/String;)V", "GetAcquire_Landroid_os_IBinder_Ljava_lang_String_Handler")]
public virtual void Acquire (Android.OS.IBinder? token, string? tag);
[<Android.Runtime.Register("acquire", "(Landroid/os/IBinder;Ljava/lang/String;)V", "GetAcquire_Landroid_os_IBinder_Ljava_lang_String_Handler")>]
abstract member Acquire : Android.OS.IBinder * string -> unit
override this.Acquire : Android.OS.IBinder * string -> unit

Parameters

token
IBinder

An IBinder object.

tag
String

A string used by the #dump method for debugging, to see who has references.

Attributes

Remarks

Record that this token has been acquired. When acquire is called, and the current count is 0, the acquired method is called on the given handler.

Note that the same token can only be acquired once. If this token has already been acquired, no action is taken. The first subsequent call to #release will release this token immediately.

Java documentation for android.os.TokenWatcher.acquire(android.os.IBinder, 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