Merge "Upstream Configuration should also consider automatic configuration" am: fad9571dc5 am: 3effe3a715

am: 0e8bcbfebd

Change-Id: I251c1b659b6cf7f1057ae01065efa520404ce78c
This commit is contained in:
Mark Chien
2018-12-11 01:22:33 -08:00
committed by android-build-merger

View File

@@ -944,10 +944,11 @@ public class Tethering extends BaseNetworkObserver {
public boolean hasTetherableConfiguration() {
final TetheringConfiguration cfg = mConfig;
final boolean hasDownstreamConfiguration =
(cfg.tetherableUsbRegexs.length != 0) ||
(cfg.tetherableWifiRegexs.length != 0) ||
(cfg.tetherableBluetoothRegexs.length != 0);
final boolean hasUpstreamConfiguration = !cfg.preferredUpstreamIfaceTypes.isEmpty();
(cfg.tetherableUsbRegexs.length != 0)
|| (cfg.tetherableWifiRegexs.length != 0)
|| (cfg.tetherableBluetoothRegexs.length != 0);
final boolean hasUpstreamConfiguration = !cfg.preferredUpstreamIfaceTypes.isEmpty()
|| cfg.chooseUpstreamAutomatically;
return hasDownstreamConfiguration && hasUpstreamConfiguration;
}