summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ConnectivityService.java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-11-13 16:29:12 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-11-13 16:29:12 -0800
commit7fdfe28c75e103b8a66b559dcb813576fbbf2eb5 (patch)
tree26efd6a084a27dcc41e7e0781955072a932cf28e /services/java/com/android/server/ConnectivityService.java
parent1fbb5da29a4ebef1d758dffad9c2704a5932d223 (diff)
parent4c514f2a688bdae319c919987092ccfee690f390 (diff)
am 4c514f2a: am 594eeb08: Merge "Fix for the invalid Global Proxy Setting" into klp-dev
* commit '4c514f2a688bdae319c919987092ccfee690f390': Fix for the invalid Global Proxy Setting
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r--services/java/com/android/server/ConnectivityService.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 634707d4e822..1574667a1f81 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -3383,6 +3383,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();
@@ -3426,6 +3431,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;
}
@@ -3450,6 +3460,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;