diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java index 43d6b71598cee..284e1a7f2869d 100644 --- a/core/java/android/net/LinkProperties.java +++ b/core/java/android/net/LinkProperties.java @@ -66,6 +66,7 @@ public class LinkProperties implements Parcelable { private String mDomains; private Collection mRoutes = new ArrayList(); private ProxyProperties mHttpProxy; + private int mMtu; // Stores the properties of links that are "stacked" above this link. // Indexed by interface name to allow modification and to prevent duplicates being added. @@ -104,6 +105,7 @@ public class LinkProperties implements Parcelable { for (LinkProperties l: source.mStackedLinks.values()) { addStackedLink(l); } + setMtu(source.getMtu()); } } @@ -223,6 +225,14 @@ public class LinkProperties implements Parcelable { mDomains = domains; } + public void setMtu(int mtu) { + mMtu = mtu; + } + + public int getMtu() { + return mMtu; + } + private RouteInfo routeWithInterface(RouteInfo route) { return new RouteInfo( route.getDestination(), @@ -322,6 +332,7 @@ public class LinkProperties implements Parcelable { mRoutes.clear(); mHttpProxy = null; mStackedLinks.clear(); + mMtu = 0; } /** @@ -346,6 +357,8 @@ public class LinkProperties implements Parcelable { String domainName = "Domains: " + mDomains; + String mtu = "MTU: " + mMtu; + String routes = " Routes: ["; for (RouteInfo route : mRoutes) routes += route.toString() + ","; routes += "] "; @@ -359,7 +372,8 @@ public class LinkProperties implements Parcelable { } stacked += "] "; } - return "{" + ifaceName + linkAddresses + routes + dns + domainName + proxy + stacked + "}"; + return "{" + ifaceName + linkAddresses + routes + dns + domainName + mtu + + proxy + stacked + "}"; } /** @@ -474,6 +488,16 @@ public class LinkProperties implements Parcelable { return true; } + /** + * Compares this {@code LinkProperties} MTU against the target + * + * @@param target LinkProperties to compare. + * @return {@code true} if both are identical, {@code false} otherwise. + */ + public boolean isIdenticalMtu(LinkProperties target) { + return getMtu() == target.getMtu(); + } + @Override /** * Compares this {@code LinkProperties} instance against the target @@ -505,7 +529,8 @@ public class LinkProperties implements Parcelable { isIdenticalDnses(target) && isIdenticalRoutes(target) && isIdenticalHttpProxy(target) && - isIdenticalStackedLinks(target); + isIdenticalStackedLinks(target) && + isIdenticalMtu(target); } /** @@ -607,7 +632,8 @@ public class LinkProperties implements Parcelable { + ((null == mDomains) ? 0 : mDomains.hashCode()) + mRoutes.size() * 41 + ((null == mHttpProxy) ? 0 : mHttpProxy.hashCode()) - + mStackedLinks.hashCode() * 47); + + mStackedLinks.hashCode() * 47) + + mMtu * 51; } /** @@ -625,7 +651,7 @@ public class LinkProperties implements Parcelable { dest.writeByteArray(d.getAddress()); } dest.writeString(mDomains); - + dest.writeInt(mMtu); dest.writeInt(mRoutes.size()); for(RouteInfo route : mRoutes) { dest.writeParcelable(route, flags); @@ -664,6 +690,7 @@ public class LinkProperties implements Parcelable { } catch (UnknownHostException e) { } } netProp.setDomains(in.readString()); + netProp.setMtu(in.readInt()); addressCount = in.readInt(); for (int i=0; i + + + + + + + 1358 + + diff --git a/core/res/res/values-mcc302-mnc370/config.xml b/core/res/res/values-mcc302-mnc370/config.xml index 3d2ea757ae4a4..4fb2232926612 100644 --- a/core/res/res/values-mcc302-mnc370/config.xml +++ b/core/res/res/values-mcc302-mnc370/config.xml @@ -36,4 +36,8 @@ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" --> Fido LTE Tethering,ltedata.apn,,,,,,,,,302,370,,DUN + + 1410 + diff --git a/core/res/res/values-mcc302-mnc610/config.xml b/core/res/res/values-mcc302-mnc610/config.xml index 706570c0bd6b0..638aa927fab70 100644 --- a/core/res/res/values-mcc302-mnc610/config.xml +++ b/core/res/res/values-mcc302-mnc610/config.xml @@ -22,4 +22,9 @@ 302 + + + 1358 + diff --git a/core/res/res/values-mcc302-mnc660/config.xml b/core/res/res/values-mcc302-mnc660/config.xml index 37853cf88f92e..76f7968a620e6 100644 --- a/core/res/res/values-mcc302-mnc660/config.xml +++ b/core/res/res/values-mcc302-mnc660/config.xml @@ -35,4 +35,9 @@ "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type" note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" --> MTS -Tethering,internet.mts,,,,,,,,,302,660,,DUN + + + 1430 + diff --git a/core/res/res/values-mcc302-mnc720/config.xml b/core/res/res/values-mcc302-mnc720/config.xml index 680f1a38f5d16..4eceffcb58700 100644 --- a/core/res/res/values-mcc302-mnc720/config.xml +++ b/core/res/res/values-mcc302-mnc720/config.xml @@ -36,4 +36,8 @@ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" --> Rogers LTE Tethering,ltedata.apn,,,,,,,,,302,720,,DUN + + 1430 + diff --git a/core/res/res/values-mcc302-mnc780/config.xml b/core/res/res/values-mcc302-mnc780/config.xml index b03d14e6b1b67..cd401912745dd 100644 --- a/core/res/res/values-mcc302-mnc780/config.xml +++ b/core/res/res/values-mcc302-mnc780/config.xml @@ -41,4 +41,9 @@ 302 + + + 1358 + diff --git a/core/res/res/values-mcc310-mnc120/config.xml b/core/res/res/values-mcc310-mnc120/config.xml new file mode 100644 index 0000000000000..62001d904482b --- /dev/null +++ b/core/res/res/values-mcc310-mnc120/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1422 + + diff --git a/core/res/res/values-mcc310-mnc260/config.xml b/core/res/res/values-mcc310-mnc260/config.xml index 56a5d4effd8d7..886ecbe5389cf 100644 --- a/core/res/res/values-mcc310-mnc260/config.xml +++ b/core/res/res/values-mcc310-mnc260/config.xml @@ -37,4 +37,8 @@ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" --> T-Mobile Tethering,pcweb.tmobile.com,,,,,,,,,310,260,,DUN + + 1440 + diff --git a/core/res/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc410/config.xml new file mode 100644 index 0000000000000..73aa1cef1a079 --- /dev/null +++ b/core/res/res/values-mcc310-mnc410/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1410 + + diff --git a/core/res/res/values-mcc440-mnc20/config.xml b/core/res/res/values-mcc440-mnc20/config.xml new file mode 100644 index 0000000000000..ba709fa434ddd --- /dev/null +++ b/core/res/res/values-mcc440-mnc20/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1340 + + diff --git a/core/res/res/values-mcc440-mnc50/config.xml b/core/res/res/values-mcc440-mnc50/config.xml new file mode 100644 index 0000000000000..fa5cba43c3dca --- /dev/null +++ b/core/res/res/values-mcc440-mnc50/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1420 + + diff --git a/core/res/res/values-mcc440-mnc54/config.xml b/core/res/res/values-mcc440-mnc54/config.xml new file mode 100644 index 0000000000000..fa5cba43c3dca --- /dev/null +++ b/core/res/res/values-mcc440-mnc54/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1420 + + diff --git a/core/res/res/values-mcc450-mnc05/config.xml b/core/res/res/values-mcc450-mnc05/config.xml new file mode 100644 index 0000000000000..d602c9fa634c6 --- /dev/null +++ b/core/res/res/values-mcc450-mnc05/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1440 + + diff --git a/core/res/res/values-mcc450-mnc06/config.xml b/core/res/res/values-mcc450-mnc06/config.xml new file mode 100644 index 0000000000000..63f9823914ed2 --- /dev/null +++ b/core/res/res/values-mcc450-mnc06/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1428 + + diff --git a/core/res/res/values-mcc450-mnc08/config.xml b/core/res/res/values-mcc450-mnc08/config.xml new file mode 100644 index 0000000000000..950c62bd1798d --- /dev/null +++ b/core/res/res/values-mcc450-mnc08/config.xml @@ -0,0 +1,28 @@ + + + + + + + + 1450 + + diff --git a/core/res/res/values-mcc505-mnc01/config.xml b/core/res/res/values-mcc505-mnc01/config.xml index f9d9ac7bf0502..7331c5009b170 100644 --- a/core/res/res/values-mcc505-mnc01/config.xml +++ b/core/res/res/values-mcc505-mnc01/config.xml @@ -37,4 +37,8 @@ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" --> Telstra Tethering,telstra.internet,,,,,,,,,505,01,,DUN + + 1400 + diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index dd233c546234b..ab95d4006bc06 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1097,6 +1097,10 @@ players. --> 10 + + 1500 +