diff options
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
| -rw-r--r-- | services/java/com/android/server/ConnectivityService.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index 3e19094..6f8c323 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -2261,9 +2261,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { boolean resetDns = updateRoutes(newLp, curLp, mNetConfigs[netType].isDefault()); if (resetMask != 0 || resetDns) { - LinkProperties linkProperties = mNetTrackers[netType].getLinkProperties(); - if (linkProperties != null) { - for (String iface : linkProperties.getAllInterfaceNames()) { + if (curLp != null) { + for (String iface : curLp.getAllInterfaceNames()) { if (TextUtils.isEmpty(iface) == false) { if (resetMask != 0) { if (DBG) log("resetConnections(" + iface + ", " + resetMask + ")"); @@ -2285,6 +2284,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { if (DBG) loge("Exception resetting dns cache: " + e); } } + } else { + loge("Can't reset connection for type "+netType); } } } @@ -3133,6 +3134,10 @@ public class ConnectivityService extends IConnectivityManager.Stub { Settings.Global.HTTP_PROXY); if (!TextUtils.isEmpty(proxy)) { String data[] = proxy.split(":"); + if (data.length == 0) { + return; + } + String proxyHost = data[0]; int proxyPort = 8080; if (data.length > 1) { @@ -3144,6 +3149,8 @@ public class ConnectivityService extends IConnectivityManager.Stub { } ProxyProperties p = new ProxyProperties(data[0], proxyPort, ""); setGlobalProxy(p); + } else { + setGlobalProxy(null); } } |
