diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-01-17 14:14:07 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-01-17 14:14:07 -0800 |
commit | 326feb8965e0bbd5b22479285f6d88cc840b5eed (patch) | |
tree | 93ad11759ad24cd98f5e3396957c7472dcaeba4f /services | |
parent | 00d0aaf9b9befafd63e4bf0d0e2a34b0e4f1428d (diff) | |
parent | 29552095e19e3faf2006ac1051da41d9bd212d6f (diff) | |
download | frameworks_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.java | 8 |
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; - } } } } |