diff options
author | Robert Greenwalt <rgreenwalt@google.com> | 2011-07-26 15:26:02 -0700 |
---|---|---|
committer | Robert Greenwalt <rgreenwalt@google.com> | 2011-07-26 15:26:02 -0700 |
commit | 22d93a0d71d965970f581cd9aa1cbf2efbb5998f (patch) | |
tree | f5b0d0a82c59d398fe2185ac047f532fba71724d /telephony | |
parent | bce8effe75c5477eb42d4e1c4df609da962285a2 (diff) | |
parent | 41394a361020e9f58524f23d6831bb8e63063856 (diff) | |
download | frameworks_base-22d93a0d71d965970f581cd9aa1cbf2efbb5998f.zip frameworks_base-22d93a0d71d965970f581cd9aa1cbf2efbb5998f.tar.gz frameworks_base-22d93a0d71d965970f581cd9aa1cbf2efbb5998f.tar.bz2 |
resolved conflicts for merge of 41394a36 to honeycomb-plus-aosp
Change-Id: If4dc99c558dc45c9a7ff8d3ea5be69578b4ee793
Diffstat (limited to 'telephony')
-rw-r--r-- | telephony/java/com/android/internal/telephony/DataCallState.java | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/telephony/java/com/android/internal/telephony/DataCallState.java b/telephony/java/com/android/internal/telephony/DataCallState.java index a69ce8b..6d8956f 100644 --- a/telephony/java/com/android/internal/telephony/DataCallState.java +++ b/telephony/java/com/android/internal/telephony/DataCallState.java @@ -142,13 +142,15 @@ public class DataCallState { } catch (IllegalArgumentException e) { throw new UnknownHostException("Non-numeric ip addr=" + addr); } - if (addrPrefixLen == 0) { - // Assume point to point - addrPrefixLen = (ia instanceof Inet4Address) ? 32 : 128; + if (! ia.isAnyLocalAddress()) { + if (addrPrefixLen == 0) { + // Assume point to point + addrPrefixLen = (ia instanceof Inet4Address) ? 32 : 128; + } + if (DBG) Log.d(LOG_TAG, "addr/pl=" + addr + "/" + addrPrefixLen); + la = new LinkAddress(ia, addrPrefixLen); + linkProperties.addLinkAddress(la); } - if (DBG) Log.d(LOG_TAG, "addr/pl=" + addr + "/" + addrPrefixLen); - la = new LinkAddress(ia, addrPrefixLen); - linkProperties.addLinkAddress(la); } } else { throw new UnknownHostException("no address for ifname=" + ifname); @@ -163,21 +165,24 @@ public class DataCallState { } catch (IllegalArgumentException e) { throw new UnknownHostException("Non-numeric dns addr=" + addr); } - linkProperties.addDns(ia); + if (! ia.isAnyLocalAddress()) { + linkProperties.addDns(ia); + } } } else if (okToUseSystemPropertyDns){ String dnsServers[] = new String[2]; dnsServers[0] = SystemProperties.get(propertyPrefix + "dns1"); dnsServers[1] = SystemProperties.get(propertyPrefix + "dns2"); for (String dnsAddr : dnsServers) { - InetAddress ia; - try { - ia = NetworkUtils.numericToInetAddress(dnsAddr); - } catch (IllegalArgumentException e) { - throw new UnknownHostException("Non-numeric dns addr=" - + dnsAddr); - } + InetAddress ia; + try { + ia = NetworkUtils.numericToInetAddress(dnsAddr); + } catch (IllegalArgumentException e) { + throw new UnknownHostException("Non-numeric dns addr=" + dnsAddr); + } + if (! ia.isAnyLocalAddress()) { linkProperties.addDns(ia); + } } } else { throw new UnknownHostException("Empty dns response and no system default dns"); @@ -199,7 +204,9 @@ public class DataCallState { } catch (IllegalArgumentException e) { throw new UnknownHostException("Non-numeric gateway addr=" + addr); } - linkProperties.addRoute(new RouteInfo(ia)); + if (! ia.isAnyLocalAddress()) { + linkProperties.addRoute(new RouteInfo(ia)); + } } result = SetupResult.SUCCESS; |