diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-03-25 11:01:02 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-25 11:01:02 -0700 |
commit | 05f14e2bcf78be62b35e85902408ea66103a3881 (patch) | |
tree | cd7f4ee311df6e9332bc44252a37220c881604ad /services | |
parent | 568845a766cddc4e4c222b4d9de064f8a48da990 (diff) | |
parent | c0e0dbb45446e5e0f7f131f2180c946778e7d711 (diff) | |
download | frameworks_base-05f14e2bcf78be62b35e85902408ea66103a3881.zip frameworks_base-05f14e2bcf78be62b35e85902408ea66103a3881.tar.gz frameworks_base-05f14e2bcf78be62b35e85902408ea66103a3881.tar.bz2 |
Merge "DO NOT MERGE Pick upstream intf with valid IP conf" into gingerbread
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 f774b29..1ec9b51 100644 --- a/services/java/com/android/server/connectivity/Tethering.java +++ b/services/java/com/android/server/connectivity/Tethering.java @@ -1173,18 +1173,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; - } } } } |