am 904fb9d7: Merge "Notify people of empty proxies too." into ics-factoryrom
* commit '904fb9d79cc72879e4c6767c219ec78feda8e62b': Notify people of empty proxies too.
This commit is contained in:
@@ -2618,7 +2618,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (VDBG) log("changing default proxy to " + proxy);
|
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;
|
if (mGlobalProxy != null) return;
|
||||||
sendProxyBroadcast(proxy);
|
sendProxyBroadcast(proxy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1768,8 +1768,10 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
|||||||
ApnSetting apn = apnContext.getApnSetting();
|
ApnSetting apn = apnContext.getApnSetting();
|
||||||
if (apn.proxy != null && apn.proxy.length() != 0) {
|
if (apn.proxy != null && apn.proxy.length() != 0) {
|
||||||
try {
|
try {
|
||||||
|
String port = apn.port;
|
||||||
|
if (TextUtils.isEmpty(port)) port = "8080";
|
||||||
ProxyProperties proxy = new ProxyProperties(apn.proxy,
|
ProxyProperties proxy = new ProxyProperties(apn.proxy,
|
||||||
Integer.parseInt(apn.port), null);
|
Integer.parseInt(port), null);
|
||||||
dcac.setLinkPropertiesHttpProxySync(proxy);
|
dcac.setLinkPropertiesHttpProxySync(proxy);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
loge("onDataSetupComplete: NumberFormatException making ProxyProperties (" +
|
loge("onDataSetupComplete: NumberFormatException making ProxyProperties (" +
|
||||||
|
|||||||
Reference in New Issue
Block a user