diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2013-08-21 17:13:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-21 17:13:50 +0000 |
commit | 4d3d5f1f9e2ccf680660086338f7b9b02c2eb648 (patch) | |
tree | e6dba06c4e288642fd34a537767dba2987fb12fb /services | |
parent | 6a99a8145c52749d794864c87ca073c7429850a5 (diff) | |
parent | 4faa027df03c241c92a12a437f20767ab4d6ee64 (diff) | |
download | frameworks_base-4d3d5f1f9e2ccf680660086338f7b9b02c2eb648.zip frameworks_base-4d3d5f1f9e2ccf680660086338f7b9b02c2eb648.tar.gz frameworks_base-4d3d5f1f9e2ccf680660086338f7b9b02c2eb648.tar.bz2 |
Merge "Modify LinkProperties address update methods." into klp-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index a0e6dd1..07a7fba 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -3982,8 +3982,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { // Get the type of addresses supported by this link LinkProperties lp = mCs.getLinkProperties( ConnectivityManager.TYPE_MOBILE_HIPRI); - boolean linkHasIpv4 = hasIPv4Address(lp); - boolean linkHasIpv6 = hasIPv6Address(lp); + boolean linkHasIpv4 = lp.hasIPv4Address(); + boolean linkHasIpv6 = lp.hasIPv6Address(); log("isMobileOk: linkHasIpv4=" + linkHasIpv4 + " linkHasIpv6=" + linkHasIpv6); @@ -4129,20 +4129,6 @@ public class ConnectivityService extends IConnectivityManager.Stub { } } - public boolean hasIPv4Address(LinkProperties lp) { - return lp.hasIPv4Address(); - } - - // Not implemented in LinkProperties, do it here. - public boolean hasIPv6Address(LinkProperties lp) { - for (LinkAddress address : lp.getLinkAddresses()) { - if (address.getAddress() instanceof Inet6Address) { - return true; - } - } - return false; - } - private void log(String s) { Slog.d(ConnectivityService.TAG, "[" + CHECKMP_TAG + "] " + s); } |