Code example for WifiManager.WifiLock

Methods: isHeld, release

            mPlayer = null;
        // we can also release the Wifi lock, if we're holding it 
        if (mWifiLock.isHeld()) mWifiLock.release();
    void giveUpAudioFocus() { 
        if (mAudioFocus == AudioFocus.Focused && mAudioFocusHelper != null
                                && mAudioFocusHelper.abandonFocus())
            mAudioFocus = AudioFocus.NoFocusNoDuck;
     * Reconfigures MediaPlayer according to audio focus settings and starts/restarts it. This 
     * method starts/restarts the MediaPlayer respecting the current audio focus state. So if 
     * we have focus, it will play normally; if we don't have focus, it will either leave the 
     * MediaPlayer paused or set it to a low volume, depending on what is allowed by the 
     * current focus settings. This method assumes mPlayer != null, so if you are calling it,