am 61efbf7f: am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev
* commit '61efbf7f38292980ec5a2211d8341c1dfb07dfcc': Fix for the invalid Global Proxy Setting
This commit is contained in:
@@ -3351,6 +3351,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
String pacFileUrl = "";
|
||||
if (proxyProperties != null && (!TextUtils.isEmpty(proxyProperties.getHost()) ||
|
||||
!TextUtils.isEmpty(proxyProperties.getPacFileUrl()))) {
|
||||
if (!proxyProperties.isValid()) {
|
||||
if (DBG)
|
||||
log("Invalid proxy properties, ignoring: " + proxyProperties.toString());
|
||||
return;
|
||||
}
|
||||
mGlobalProxy = new ProxyProperties(proxyProperties);
|
||||
host = mGlobalProxy.getHost();
|
||||
port = mGlobalProxy.getPort();
|
||||
@@ -3394,6 +3399,11 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
} else {
|
||||
proxyProperties = new ProxyProperties(host, port, exclList);
|
||||
}
|
||||
if (!proxyProperties.isValid()) {
|
||||
if (DBG) log("Invalid proxy properties, ignoring: " + proxyProperties.toString());
|
||||
return;
|
||||
}
|
||||
|
||||
synchronized (mProxyLock) {
|
||||
mGlobalProxy = proxyProperties;
|
||||
}
|
||||
@@ -3418,6 +3428,10 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
synchronized (mProxyLock) {
|
||||
if (mDefaultProxy != null && mDefaultProxy.equals(proxy)) return;
|
||||
if (mDefaultProxy == proxy) return; // catches repeated nulls
|
||||
if (!proxy.isValid()) {
|
||||
if (DBG) log("Invalid proxy properties, ignoring: " + proxy.toString());
|
||||
return;
|
||||
}
|
||||
mDefaultProxy = proxy;
|
||||
|
||||
if (mGlobalProxy != null) return;
|
||||
|
||||
Reference in New Issue
Block a user