diff options
| author | Jason Monk <jmonk@google.com> | 2013-08-23 19:21:25 -0400 |
|---|---|---|
| committer | Jason Monk <jmonk@google.com> | 2013-09-13 09:53:26 -0400 |
| commit | 6f8a68f49a7e8cf86104e721a1e8be7568b5f730 (patch) | |
| tree | dbe5e5d7001b191c376d3ba3510cbf6f7f309279 /core/java/android/net/ProxyProperties.java | |
| parent | 86d9c457de3285f01552d4046a8a260c7a75147f (diff) | |
| download | frameworks_base-6f8a68f49a7e8cf86104e721a1e8be7568b5f730.zip frameworks_base-6f8a68f49a7e8cf86104e721a1e8be7568b5f730.tar.gz frameworks_base-6f8a68f49a7e8cf86104e721a1e8be7568b5f730.tar.bz2 | |
Guarantee that PAC Local Proxy owns Port
This changes the PAC support to not broadcast the Proxy information until
the Local Proxy has started up and successfully bound to a port so that
the local proxy information can be guaranteed to be owned by the proxy.
Bug: 10459877
Change-Id: I175cd3388c758c55e341115e4a8241884b90d633
Diffstat (limited to 'core/java/android/net/ProxyProperties.java')
| -rw-r--r-- | core/java/android/net/ProxyProperties.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/net/ProxyProperties.java b/core/java/android/net/ProxyProperties.java index 76aea9f..648a4b3 100644 --- a/core/java/android/net/ProxyProperties.java +++ b/core/java/android/net/ProxyProperties.java @@ -38,7 +38,7 @@ public class ProxyProperties implements Parcelable { private String mPacFileUrl; public static final String LOCAL_EXCL_LIST = ""; - public static final int LOCAL_PORT = 8182; + public static final int LOCAL_PORT = -1; public static final String LOCAL_HOST = "localhost"; public ProxyProperties(String host, int port, String exclList) { @@ -54,6 +54,14 @@ public class ProxyProperties implements Parcelable { mPacFileUrl = pacFileUrl; } + // Only used in PacManager after Local Proxy is bound. + public ProxyProperties(String pacFileUrl, int localProxyPort) { + mHost = LOCAL_HOST; + mPort = localProxyPort; + setExclusionList(LOCAL_EXCL_LIST); + mPacFileUrl = pacFileUrl; + } + private ProxyProperties(String host, int port, String exclList, String[] parsedExclList) { mHost = host; mPort = port; |
