summaryrefslogtreecommitdiffstats
path: root/core/tests
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2011-02-11 17:01:02 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2011-02-14 14:32:33 -0800
commitb979f79158f9c470fa09ff3b96d72db274262201 (patch)
treebdad85179cdaef4d411b4b7d333c4c03e82682f8 /core/tests
parentb495eb90cfc62c9fe393e70d2dc9766c81b3a880 (diff)
downloadframeworks_base-b979f79158f9c470fa09ff3b96d72db274262201.zip
frameworks_base-b979f79158f9c470fa09ff3b96d72db274262201.tar.gz
frameworks_base-b979f79158f9c470fa09ff3b96d72db274262201.tar.bz2
Remove more use of netmask
bug:2542681 Change-Id: Ifd75672739ee8262d4df22afd8173e4f3f67260d
Diffstat (limited to 'core/tests')
-rw-r--r--core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/AccessPointParserHelper.java24
1 files changed, 4 insertions, 20 deletions
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;
* <accesspoint></accesspoint>. 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 <resources></resources>.
+ * Tags that can be used include: ip, gateway, networkprefixlength, dns1, dns2. All access points
+ * have to be enclosed in tags of <resources></resources>.
*
* The following is a sample configuration file for an access point using EAP-PEAP with MSCHAP2.
* <resources>
@@ -62,7 +62,8 @@ import java.util.List;
* </resources>
*
* 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);