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(); } }
public void updateFromScanResult(ScanResult scanResult) { blockRefresh(); // We don't keep specific AP BSSIDs and instead leave that as wildcard setSeen(true); setSsid(scanResult.SSID); if (networkId == NETWORK_ID_NOT_SET) { // Since ScanResults don't cross-reference network ID, we set it as a wildcard setNetworkId(NETWORK_ID_ANY); } setSignal(scanResult.level); setSecurity(getScanResultSecurity(scanResult)); unblockRefresh(); }