SparseArray<IpConfiguration> networks = readIpAndProxyConfigurations(ipConfigFile);
if (networks.size() == 0) {
Log.w(TAG, "No Ethernet configuration found. Using default.");
return new IpConfiguration(IpAssignment.DHCP, ProxySettings.NONE, null, null);
}
if (networks.size() > 1) {
// Currently we only support a single Ethernet interface.
Log.w(TAG, "Multiple Ethernet configurations detected. Only reading first one.");
}
return networks.valueAt(0);