Merge "Revert "Include both eth%d and usb%d ethernet interfaces on U+"" into main
This commit is contained in:
@@ -48,7 +48,6 @@ import android.util.Log;
|
|||||||
|
|
||||||
import com.android.internal.annotations.VisibleForTesting;
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.util.IndentingPrintWriter;
|
import com.android.internal.util.IndentingPrintWriter;
|
||||||
import com.android.modules.utils.build.SdkLevel;
|
|
||||||
import com.android.net.module.util.NetdUtils;
|
import com.android.net.module.util.NetdUtils;
|
||||||
import com.android.net.module.util.PermissionUtils;
|
import com.android.net.module.util.PermissionUtils;
|
||||||
import com.android.net.module.util.SharedLog;
|
import com.android.net.module.util.SharedLog;
|
||||||
@@ -238,18 +237,7 @@ public class EthernetTracker {
|
|||||||
mDeps = deps;
|
mDeps = deps;
|
||||||
|
|
||||||
// Interface match regex.
|
// Interface match regex.
|
||||||
String ifaceMatchRegex = mDeps.getInterfaceRegexFromResource(mContext);
|
mIfaceMatch = mDeps.getInterfaceRegexFromResource(mContext);
|
||||||
// "*" is a magic string to indicate "pick the default".
|
|
||||||
if (ifaceMatchRegex.equals("*")) {
|
|
||||||
if (SdkLevel.isAtLeastU()) {
|
|
||||||
// On U+, include both usb%d and eth%d interfaces.
|
|
||||||
ifaceMatchRegex = "(usb|eth)\\d+";
|
|
||||||
} else {
|
|
||||||
// On T, include only eth%d interfaces.
|
|
||||||
ifaceMatchRegex = "eth\\d+";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mIfaceMatch = ifaceMatchRegex;
|
|
||||||
|
|
||||||
// Read default Ethernet interface configuration from resources
|
// Read default Ethernet interface configuration from resources
|
||||||
final String[] interfaceConfigs = mDeps.getInterfaceConfigFromResource(context);
|
final String[] interfaceConfigs = mDeps.getInterfaceConfigFromResource(context);
|
||||||
|
|||||||
@@ -194,11 +194,8 @@
|
|||||||
-->
|
-->
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Regex of wired ethernet ifaces. Network interfaces that match this regex will be tracked
|
<!-- Regex of wired ethernet ifaces -->
|
||||||
by ethernet service.
|
<string translatable="false" name="config_ethernet_iface_regex">eth\\d</string>
|
||||||
If set to "*", ethernet service uses "(eth|usb)\\d+" on Android U+ and eth\\d+ on
|
|
||||||
Android T. -->
|
|
||||||
<string translatable="false" name="config_ethernet_iface_regex">*</string>
|
|
||||||
|
|
||||||
<!-- Ignores Wi-Fi validation failures after roam.
|
<!-- Ignores Wi-Fi validation failures after roam.
|
||||||
If validation fails on a Wi-Fi network after a roam to a new BSSID,
|
If validation fails on a Wi-Fi network after a roam to a new BSSID,
|
||||||
|
|||||||
Reference in New Issue
Block a user