Always read ethernet regex
This commit is contained in:
@@ -144,6 +144,7 @@ Greylisted APIs or internal constants: (some constants are hardcoded or implicit
|
||||
* (since API 30) `Lcom/android/internal/R$array;->config_tether_wifi_p2p_regexs:I,blacklist`
|
||||
* `Lcom/android/internal/R$array;->config_tether_wifi_regexs:I,greylist-max-q`
|
||||
* (since API 28) [`Lcom/android/internal/R$integer;->config_wifi_framework_soft_ap_timeout_delay:I,greylist-max-o`](https://android.googlesource.com/platform/prebuilts/runtime/+/3d07e5c/appcompat/hiddenapi-flags.csv#245007)
|
||||
* [`Lcom/android/internal/R$string;->config_ethernet_iface_regex:I,greylist-max-o`](https://android.googlesource.com/platform/prebuilts/runtime/+/3d07e5c/appcompat/hiddenapi-flags.csv#245611)
|
||||
* (since API 27) `Lcom/android/server/connectivity/tethering/OffloadHardwareInterface;->DEFAULT_TETHER_OFFLOAD_DISABLED:I`
|
||||
* (prior to API 29) [`Ljava/net/InetAddress;->parseNumericAddress(Ljava/lang/String;)Ljava/net/InetAddress;,core-platform-api,greylist-max-p`](https://android.googlesource.com/platform/prebuilts/runtime/+/3d07e5c/appcompat/hiddenapi-flags.csv#335306)
|
||||
|
||||
|
||||
@@ -48,11 +48,9 @@ enum class TetherType {
|
||||
wimaxRegexs = getRegexs("config_tether_wimax_regexs")
|
||||
bluetoothRegexs = getRegexs("config_tether_bluetooth_regexs")
|
||||
ncmRegexs = if (BuildCompat.isAtLeastR()) getRegexs("config_tether_ncm_regexs") else emptyList()
|
||||
ethernetRegex = if (BuildCompat.isAtLeastR()) {
|
||||
system.getString(system.getIdentifier("config_ethernet_iface_regex", "string", "android")).run {
|
||||
if (isEmpty()) null else toPattern()
|
||||
}
|
||||
} else null
|
||||
// available since Android 4.0: https://android.googlesource.com/platform/frameworks/base/+/c96a667162fab44a250503caccb770109a9cb69a
|
||||
ethernetRegex = system.getString(system.getIdentifier("config_ethernet_iface_regex", "string",
|
||||
"android")).run { if (isEmpty()) null else toPattern() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user