Allow control over search order for tethering upstream interface selection

Change-Id: If02c9b2bb61b68ebafafadc23ba17a332bc8004f
Signed-off-by: TK MUN <tk.mun@samsung.com>
This commit is contained in:
TK MUN
2011-05-18 18:30:48 +09:00
committed by Simon Wilson
parent c9cd2387b6
commit 94260caf2f
2 changed files with 3 additions and 2 deletions

View File

@ -125,6 +125,7 @@
<!-- Regex array of allowable upstream ifaces for tethering - for example if you want <!-- 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 --> 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 translatable="false" name="config_tether_upstream_regexs">
</string-array> </string-array>

View File

@ -1170,8 +1170,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub {
return null; return null;
} }
for (String iface : ifaces) { for (String regex : mUpstreamIfaceRegexs) {
for (String regex : mUpstreamIfaceRegexs) { for (String iface : ifaces) {
if (iface.matches(regex)) { if (iface.matches(regex)) {
// verify it is active // verify it is active
InterfaceConfiguration ifcg = null; InterfaceConfiguration ifcg = null;