summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcore/res/res/values/config.xml1
-rw-r--r--services/java/com/android/server/connectivity/Tethering.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 916dd81bd7fa..90f43a484a46 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -125,6 +125,7 @@
<!-- Regex array of allowable upstream ifaces for tethering - for example if you want
tethering on a new interface called "foo2" add <item>"foo\\d"</item> to the array -->
+ <!-- Interfaces will be prioritized according to the order listed -->
<string-array translatable="false" name="config_tether_upstream_regexs">
</string-array>
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 1ec9b5116172..a4301285d142 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -1170,8 +1170,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
return null;
}
- for (String iface : ifaces) {
- for (String regex : mUpstreamIfaceRegexs) {
+ for (String regex : mUpstreamIfaceRegexs) {
+ for (String iface : ifaces) {
if (iface.matches(regex)) {
// verify it is active
InterfaceConfiguration ifcg = null;