am cb134203: am 86f5a149: Merge "Change PacProxySelector to return unresolved addr" into klp-dev
* commit 'cb1342032283d1a415eb4f916a79039aa8ed0cbf':
Change PacProxySelector to return unresolved addr
diff --git a/core/java/android/net/PacProxySelector.java b/core/java/android/net/PacProxySelector.java
index b674324..8a2c2b6 100644
--- a/core/java/android/net/PacProxySelector.java
+++ b/core/java/android/net/PacProxySelector.java
@@ -97,7 +97,7 @@
} catch (Exception e) {
port = 8080;
}
- ret.add(new Proxy(Type.HTTP, new InetSocketAddress(host, port)));
+ ret.add(new Proxy(Type.HTTP, InetSocketAddress.createUnresolved(host, port)));
}
}
if (ret.size() == 0) {
diff --git a/packages/services/Proxy/src/com/android/proxyhandler/ProxyServer.java b/packages/services/Proxy/src/com/android/proxyhandler/ProxyServer.java
index 596435a..10bcdad 100644
--- a/packages/services/Proxy/src/com/android/proxyhandler/ProxyServer.java
+++ b/packages/services/Proxy/src/com/android/proxyhandler/ProxyServer.java
@@ -117,8 +117,8 @@
if (!proxy.equals(Proxy.NO_PROXY)) {
// Only Inets created by PacProxySelector.
InetSocketAddress inetSocketAddress =
- (InetSocketAddress)list.get(0).address();
- server = new Socket(inetSocketAddress.getAddress(),
+ (InetSocketAddress)proxy.address();
+ server = new Socket(inetSocketAddress.getHostName(),
inetSocketAddress.getPort());
sendLine(server, requestLine);
} else {