summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/ConnectivityService.java
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2013-05-23 18:33:06 -0700
committerRobert Greenwalt <rgreenwalt@google.com>2013-05-23 18:33:06 -0700
commit80eb63b58b2d722ce5738d0daeccbf85dee36d05 (patch)
tree833da4f322baf5ab1f4070e911dbe88f5a6ff2f6 /services/java/com/android/server/ConnectivityService.java
parent4c32885c4249be9b0a9e674b96ebacc78152b47e (diff)
Use the old interface when resetting connections
The new one is often null when disconnected, so using the new fails. In other situations, it's the connections on the old network we want to reset anyway, so the old code when it would work would also do the wrong thing (unless new iface == old iface). bug:9112928 Change-Id: I1fcae89cc3aa9d712e516e7c97cece0b89869bd9
Diffstat (limited to 'services/java/com/android/server/ConnectivityService.java')
-rw-r--r--services/java/com/android/server/ConnectivityService.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 3e19094bba71..37a8cb85c05c 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);
}
}
}