summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorIrfan Sheriff <isheriff@google.com>2011-01-17 14:14:07 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-17 14:14:07 -0800
commit326feb8965e0bbd5b22479285f6d88cc840b5eed (patch)
tree93ad11759ad24cd98f5e3396957c7472dcaeba4f /services
parent00d0aaf9b9befafd63e4bf0d0e2a34b0e4f1428d (diff)
parent29552095e19e3faf2006ac1051da41d9bd212d6f (diff)
downloadframeworks_base-326feb8965e0bbd5b22479285f6d88cc840b5eed.zip
frameworks_base-326feb8965e0bbd5b22479285f6d88cc840b5eed.tar.gz
frameworks_base-326feb8965e0bbd5b22479285f6d88cc840b5eed.tar.bz2
Merge "Pick an upstream interface with valid IP config" into honeycomb
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/connectivity/Tethering.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 134b91e..dd9db9a 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -1233,18 +1233,18 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
for (String iface : ifaces) {
for (String regex : mUpstreamIfaceRegexs) {
if (iface.matches(regex)) {
- // verify it is up!
+ // verify it is active
InterfaceConfiguration ifcg = null;
try {
ifcg = service.getInterfaceConfig(iface);
+ if (ifcg.isActive()) {
+ return iface;
+ }
} catch (Exception e) {
Log.e(TAG, "Error getting iface config :" + e);
// ignore - try next
continue;
}
- if (ifcg.interfaceFlags.contains("up")) {
- return iface;
- }
}
}
}