diff options
| author | 2011-09-21 16:37:34 -0700 | |
|---|---|---|
| committer | 2011-09-21 16:37:34 -0700 | |
| commit | 0e09082559885528a37e48ab0a865ac6754d2fd5 (patch) | |
| tree | be18fdf8de8c675ff17c42d0674fca12c0529ddf | |
| parent | 22aa7805dd0d9bf1c31b5cff526fda793477d8a7 (diff) | |
Notify people of empty proxies too.
We were telling people when the proxy changed, except if it was changed to null.
bug:5263946
Change-Id: I83416dac8fe992168a8aafd5676f9faee4e484d0
| -rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 3 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 23fab72dc558..e28c7151795e 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -2618,7 +2618,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { } } if (VDBG) log("changing default proxy to " + proxy); - if ((proxy == null && mGlobalProxy == null) || proxy.equals(mGlobalProxy)) return; + + // global trumps default, if set, ignore this. if (mGlobalProxy != null) return; sendProxyBroadcast(proxy); } diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index ebf5e65a3d9d..c62ccc68ce26 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -1768,8 +1768,10 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { ApnSetting apn = apnContext.getApnSetting(); if (apn.proxy != null && apn.proxy.length() != 0) { try { + String port = apn.port; + if (TextUtils.isEmpty(port)) port = "8080"; ProxyProperties proxy = new ProxyProperties(apn.proxy, - Integer.parseInt(apn.port), null); + Integer.parseInt(port), null); dcac.setLinkPropertiesHttpProxySync(proxy); } catch (NumberFormatException e) { loge("onDataSetupComplete: NumberFormatException making ProxyProperties (" + |