summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@android.com>2010-10-11 10:46:01 -0700
committerBrad Fitzpatrick <bradfitz@android.com>2010-10-11 10:46:01 -0700
commitf21b4cde1865747ed054111944e6b30e38109293 (patch)
treebab5ec90cf3b26ed89a28ff4ff2a327bc0260fff
parent2b4b3bd4b45255a21ff296271c02167a800a3958 (diff)
parentb3ffd4adccc430f59a9348dd218d23545e4f6c65 (diff)
downloadframeworks_base-f21b4cde1865747ed054111944e6b30e38109293.zip
frameworks_base-f21b4cde1865747ed054111944e6b30e38109293.tar.gz
frameworks_base-f21b4cde1865747ed054111944e6b30e38109293.tar.bz2
resolved conflicts for merge of b3ffd4ad to master
Change-Id: I80b227b678ef168a45494acf879debed5861de39
-rw-r--r--core/java/android/net/Proxy.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/net/Proxy.java b/core/java/android/net/Proxy.java
index 830ff06..23a3ea8 100644
--- a/core/java/android/net/Proxy.java
+++ b/core/java/android/net/Proxy.java
@@ -299,15 +299,15 @@ public final class Proxy {
final URI uri = URI.create(url);
final String host = uri.getHost();
if (host != null) {
- if (host.equalsIgnoreCase("localhost")) {
- return true;
- }
- if (InetAddress.getByName(host).isLoopbackAddress()) {
+ // TODO: InetAddress.isLoopbackAddress should be used to check
+ // for localhost. However no public factory methods exist which
+ // can be used without triggering DNS lookup if host is not localhost.
+ if (host.equalsIgnoreCase("localhost") ||
+ host.equals("127.0.0.1") ||
+ host.equals("[::1]")) {
return true;
}
}
- } catch (UnknownHostException uex) {
- // Ignore (INetworkSystem.ipStringToByteArray)
} catch (IllegalArgumentException iex) {
// Ignore (URI.create)
}