diff options
| author | Jason Monk <jmonk@google.com> | 2013-10-10 14:02:51 -0400 |
|---|---|---|
| committer | Jason Monk <jmonk@google.com> | 2013-10-10 17:01:45 -0400 |
| commit | decd295b1371238c97c170226c6145948492eda1 (patch) | |
| tree | d09dd8518898ee7e8c356c6845aea951f3c55602 /core/java | |
| parent | e6d419de77344300e342c8a0f6c013afeec87a72 (diff) | |
getProxy in ConnectivityService returns port w/PAC
Changes the PacManager to report message back to ConnectivityService
to send a broadcast once the download has completed. This allows the
ConnectivityService to store the correct proxy info for getProxy().
This made the problem arise that ProxyProperties was not handling port
while it had PAC. Added small fix for equals() and parcelization.
The combination of these fixes seems to resolve Bug: 11028616.
Bug: 11168706
Change-Id: I92d1343a8e804391ab77596b8167a2ef8d76b378
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/net/ProxyProperties.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/java/android/net/ProxyProperties.java b/core/java/android/net/ProxyProperties.java index 648a4b37ebb3..78ac75f22c36 100644 --- a/core/java/android/net/ProxyProperties.java +++ b/core/java/android/net/ProxyProperties.java @@ -178,7 +178,7 @@ public class ProxyProperties implements Parcelable { // If PAC URL is present in either then they must be equal. // Other parameters will only be for fall back. if (!TextUtils.isEmpty(mPacFileUrl)) { - return mPacFileUrl.equals(p.getPacFileUrl()); + return mPacFileUrl.equals(p.getPacFileUrl()) && mPort == p.mPort; } if (!TextUtils.isEmpty(p.getPacFileUrl())) { return false; @@ -219,6 +219,7 @@ public class ProxyProperties implements Parcelable { if (mPacFileUrl != null) { dest.writeByte((byte)1); dest.writeString(mPacFileUrl); + dest.writeInt(mPort); return; } else { dest.writeByte((byte)0); @@ -244,7 +245,9 @@ public class ProxyProperties implements Parcelable { String host = null; int port = 0; if (in.readByte() != 0) { - return new ProxyProperties(in.readString()); + String url = in.readString(); + int localPort = in.readInt(); + return new ProxyProperties(url, localPort); } if (in.readByte() != 0) { host = in.readString(); |
