WifiManager.WifiLock.SetReferenceCounted(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Controls whether this is a reference-counted or non-reference-counted WifiLock.
[Android.Runtime.Register("setReferenceCounted", "(Z)V", "GetSetReferenceCounted_ZHandler")]
public virtual void SetReferenceCounted (bool refCounted);
[<Android.Runtime.Register("setReferenceCounted", "(Z)V", "GetSetReferenceCounted_ZHandler")>]
abstract member SetReferenceCounted : bool -> unit
override this.SetReferenceCounted : bool -> unit
Parameters
- refCounted
- Boolean
true if this WifiLock should keep a reference count
- Attributes
Remarks
Controls whether this is a reference-counted or non-reference-counted WifiLock.
Reference-counted WifiLocks keep track of the number of calls to #acquire
and #release
, and only allow the radio to sleep when every call to #acquire
has been balanced with a call to #release
. Non-reference-counted WifiLocks lock the radio whenever #acquire
is called and it is unlocked, and unlock the radio whenever #release
is called and it is locked.
Java documentation for android.net.wifi.WifiManager.WifiLock.setReferenceCounted(boolean)
.
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.