public void updateFromWifiConfiguration(WifiConfiguration wifiConfig) { if (wifiConfig != null) { blockRefresh(); setBssid(wifiConfig.BSSID); setNetworkId(wifiConfig.networkId); setPriority(wifiConfig.priority); setHiddenSsid(wifiConfig.hiddenSSID); setSsid(wifiConfig.SSID); setConfigured(true); setDisabled(wifiConfig.status == WifiConfiguration.Status.DISABLED); parseWifiConfigurationSecurity(wifiConfig); 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(); } }