Code example for WifiManager.WifiLock

Methods: acquire, isHeld

0
			} 
		} 
	} 
 
	private void acquireWifiLockIfNecessaryLocked() { 
		if (mLockingWifi && mNetworkRef > 0 && !mWifiLock.isHeld()) {
			mWifiLock.acquire();
		} 
	} 
 
	private void releaseWifiLockIfNecessaryLocked() { 
		if (mNetworkRef == 0 && mWifiLock.isHeld()) {
			mWifiLock.release();
		} 
	} 
 
	/** 
	 * @return whether we're connected to a network 
	 */ 
	public boolean isConnected() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE