// 使用静态IP还是DHCP
private static final String ETHERNET_USE_STATIC_IP = “ethernet_use_static_ip”;
// IP
private static final String ETHERNET_STATIC_IP = “ethernet_static_ip”;
// 网关
private static final String ETHERNET_STATIC_GATEWAY = “ethernet_static_gateway”;
// 子网掩码
private static final String ETHERNET_STATIC_NETMASK = “ethernet_static_netmask”;
// DNS1
private static final String ETHERNET_STATIC_DNS1 = “ethernet_static_dns1”;
// DNS2
private static final String ETHERNET_STATIC_DNS2 = “ethernet_static_dns2”;
EthernetManager
EthernetManager mEthManager = (EthernetManager)getSystemService(Context.ETHERNET_SERVICE);
GET
checkStaticIP = (CheckBox) findViewById(R.id.checkStaticIP);
checkStaticIP.setChecked(Settings.System.getInt(contentResolver,
ETHERNET_USE_STATIC_IP, 0) != 0);
checkStaticIP