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 /services/java/com/android/server/ConnectivityService.java | |
parent | e6d419de77344300e342c8a0f6c013afeec87a72 (diff) | |
download | base-decd295b1371238c97c170226c6145948492eda1.tar.gz |
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 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 5695ee510d1b..70418e8d04bf 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -353,6 +353,11 @@ public class ConnectivityService extends IConnectivityManager.Stub { */ private static final int EVENT_SAMPLE_INTERVAL_ELAPSED = 15; + /** + * PAC manager has received new port. + */ + private static final int EVENT_PROXY_HAS_CHANGED = 16; + /** Handler used for internal events. */ private InternalHandler mHandler; /** Handler used for incoming {@link NetworkStateTracker} events. */ @@ -679,7 +684,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { }, new IntentFilter(filter)); - mPacManager = new PacManager(mContext); + mPacManager = new PacManager(mContext, mHandler, EVENT_PROXY_HAS_CHANGED); filter = new IntentFilter(); filter.addAction(CONNECTED_TO_PROVISIONING_NETWORK_ACTION); @@ -3124,6 +3129,10 @@ public class ConnectivityService extends IConnectivityManager.Stub { handleNetworkSamplingTimeout(); break; } + case EVENT_PROXY_HAS_CHANGED: { + handleApplyDefaultProxy((ProxyProperties)msg.obj); + break; + } } } } |