From b979f79158f9c470fa09ff3b96d72db274262201 Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Fri, 11 Feb 2011 17:01:02 -0800 Subject: Remove more use of netmask bug:2542681 Change-Id: Ifd75672739ee8262d4df22afd8173e4f3f67260d --- .../AccessPointParserHelper.java | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'core/tests') diff --git a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java index 1ecf103..3667c7b 100644 --- a/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java +++ b/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java @@ -46,8 +46,8 @@ import java.util.List; * . The supported configuration includes: ssid, * security, eap, phase2, identity, password, anonymousidentity, cacert, usercert, * in which each is included in the corresponding tags. Static IP setting is also supported. - * Tags that can be used include: ip, gateway, netmask, dns1, dns2. All access points have to be - * enclosed in tags of . + * Tags that can be used include: ip, gateway, networkprefixlength, dns1, dns2. All access points + * have to be enclosed in tags of . * * The following is a sample configuration file for an access point using EAP-PEAP with MSCHAP2. * @@ -62,7 +62,8 @@ import java.util.List; * * * Note:ssid and security have to be the first two tags - * for static ip setting, tag "ip" should be listed before other fields: dns, gateway, netmask. + * for static ip setting, tag "ip" should be listed before other fields: dns, gateway, + * networkprefixlength. */ public class AccessPointParserHelper { private static final String KEYSTORE_SPACE = "keystore://"; @@ -106,7 +107,6 @@ public class AccessPointParserHelper { boolean ip = false; boolean gateway = false; boolean networkprefix = false; - boolean netmask = false; boolean dns1 = false; boolean dns2 = false; boolean eap = false; @@ -163,9 +163,6 @@ public class AccessPointParserHelper { if (tagName.equalsIgnoreCase("networkprefixlength")) { networkprefix = true; } - if (tagName.equalsIgnoreCase("netmask")) { - netmask = true; - } if (tagName.equalsIgnoreCase("dns1")) { dns1 = true; } @@ -321,19 +318,6 @@ public class AccessPointParserHelper { } networkprefix = false; } - if (netmask) { - try { - String netMaskStr = new String(ch, start, length); - if (!InetAddress.isNumeric(netMaskStr)) { - throw new SAXException(); - } - InetAddress netMaskAddr = InetAddress.getByName(netMaskStr); - mLinkProperties.addLinkAddress(new LinkAddress(mInetAddr, netMaskAddr)); - } catch (UnknownHostException e) { - throw new SAXException(); - } - netmask = false; - } if (dns1) { try { String dnsAddr = new String(ch, start, length); -- cgit v1.1