Merge "Notify people of empty proxies too." into ics-factoryrom

This commit is contained in:
Wink Saville
2011-09-22 10:52:25 -07:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 2 deletions

View File

@ -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);
}

View File

@ -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 (" +