More concisely export whether we have a "tetherable configuration"

Test: as follows
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net passes
    - vanilla WiFi-to-mobile tethering works
Bug: 32163131
Change-Id: I20dd36b5bf7fc55a639c76ea4bdb55b650654881
This commit is contained in:
Erik Kline
2017-01-23 13:01:58 +09:00
parent f4fcd280f1
commit 21933391e8

View File

@@ -3130,10 +3130,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
Settings.Global.TETHER_SUPPORTED, defaultVal) != 0) Settings.Global.TETHER_SUPPORTED, defaultVal) != 0)
&& !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING); && !mUserManager.hasUserRestriction(UserManager.DISALLOW_CONFIG_TETHERING);
return tetherEnabledInSettings && mUserManager.isAdminUser() && return tetherEnabledInSettings && mUserManager.isAdminUser() &&
((mTethering.getTetherableUsbRegexs().length != 0 || mTethering.hasTetherableConfiguration();
mTethering.getTetherableWifiRegexs().length != 0 ||
mTethering.getTetherableBluetoothRegexs().length != 0) &&
mTethering.getUpstreamIfaceTypes().length != 0);
} }
@Override @Override