/** * Updates the state as if it were never configured. * * <p>Note: This will not pass the forget call to the Wi-Fi API. */ public void forget() { blockRefresh(); setConfigured(false); setNetworkId(NETWORK_ID_NOT_SET); setPrimary(false); setStatus(null); setDisabled(false); unblockRefresh(); }
public void updateFromWifiInfo(WifiInfo wifiInfo, NetworkInfo.DetailedState state) { if (wifiInfo != null) { blockRefresh(); setBssid(wifiInfo.getBSSID()); setLinkSpeed(wifiInfo.getLinkSpeed()); setNetworkId(wifiInfo.getNetworkId()); setIpAddress(wifiInfo.getIpAddress()); setSsid(wifiInfo.getSSID()); if (state != null) { setStatus(state); } setHiddenSsid(wifiInfo.getHiddenSSID()); unblockRefresh(); } }