Sdílet prostřednictvím


WifiManager.WifiLock.Release Method

Definition

Unlocks the Wi-Fi radio, allowing it to turn off when the device is idle.

[Android.Runtime.Register("release", "()V", "GetReleaseHandler")]
public virtual void Release ();
[<Android.Runtime.Register("release", "()V", "GetReleaseHandler")>]
abstract member Release : unit -> unit
override this.Release : unit -> unit
Attributes

Remarks

Unlocks the Wi-Fi radio, allowing it to turn off when the device is idle.

If this WifiLock is reference-counted, each call to release will decrement the reference count, and the radio will be unlocked only when the reference count reaches zero. If the reference count goes below zero (that is, if release is called a greater number of times than #acquire), an exception is thrown.

If this WifiLock is not reference-counted, the first call to release (after the radio was locked using #acquire) will unlock the radio, and subsequent calls will be ignored.

Java documentation for android.net.wifi.WifiManager.WifiLock.release().

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