Deprecate unused WiMAX tethering

This commit is contained in:
Mygod
2020-08-07 07:48:47 +08:00
parent 1357488fad
commit 6305989cf7
4 changed files with 2 additions and 17 deletions

View File

@@ -281,7 +281,6 @@ Greylisted/blacklisted APIs or internal constants: (some constants are hardcoded
Nonexported system resources: Nonexported system resources:
* `@android:array/config_tether_wimax_regexs`
* (since API 30) `@com.android.networkstack.tethering:array/config_tether_bluetooth_regexs` * (since API 30) `@com.android.networkstack.tethering:array/config_tether_bluetooth_regexs`
* (since API 30) `@com.android.networkstack.tethering:array/config_tether_ncm_regexs` * (since API 30) `@com.android.networkstack.tethering:array/config_tether_ncm_regexs`
* (since API 30) `@com.android.networkstack.tethering:array/config_tether_usb_regexs` * (since API 30) `@com.android.networkstack.tethering:array/config_tether_usb_regexs`

View File

@@ -29,7 +29,7 @@ abstract class RootSession {
closeLocked() closeLocked()
usersCount = 0 usersCount = 0
} }
check(usersCount == 0L) check(usersCount == 0L) { "Unexpected $server, $usersCount" }
val server = createServer() val server = createServer()
try { try {
initServer(server) initServer(server)

View File

@@ -15,7 +15,6 @@ enum class TetherType(@DrawableRes val icon: Int) {
WIFI_P2P(R.drawable.ic_action_settings_input_antenna), WIFI_P2P(R.drawable.ic_action_settings_input_antenna),
USB(R.drawable.ic_device_usb), USB(R.drawable.ic_device_usb),
WIFI(R.drawable.ic_device_network_wifi), WIFI(R.drawable.ic_device_network_wifi),
WIMAX(R.drawable.ic_action_contactless),
BLUETOOTH(R.drawable.ic_device_bluetooth), BLUETOOTH(R.drawable.ic_device_bluetooth),
// if you have an issue with these Ethernet icon namings, blame Google // if you have an issue with these Ethernet icon namings, blame Google
NCM(R.drawable.ic_action_settings_ethernet), NCM(R.drawable.ic_action_settings_ethernet),
@@ -24,7 +23,7 @@ enum class TetherType(@DrawableRes val icon: Int) {
; ;
val isWifi get() = when (this) { val isWifi get() = when (this) {
WIFI_P2P, WIFI, WIMAX, WIGIG -> true WIFI_P2P, WIFI, WIGIG -> true
else -> false else -> false
} }
@@ -33,7 +32,6 @@ enum class TetherType(@DrawableRes val icon: Int) {
private lateinit var wifiRegexs: List<Pattern> private lateinit var wifiRegexs: List<Pattern>
private var wigigRegexs = emptyList<Pattern>() private var wigigRegexs = emptyList<Pattern>()
private var wifiP2pRegexs = emptyList<Pattern>() private var wifiP2pRegexs = emptyList<Pattern>()
private val wimaxRegexs: List<Pattern>
private lateinit var bluetoothRegexs: List<Pattern> private lateinit var bluetoothRegexs: List<Pattern>
private var ncmRegexs = emptyList<Pattern>() private var ncmRegexs = emptyList<Pattern>()
private val ethernetRegex: Pattern? private val ethernetRegex: Pattern?
@@ -88,7 +86,6 @@ enum class TetherType(@DrawableRes val icon: Int) {
wifiRegexs = system.getRegexs("config_tether_wifi_regexs") wifiRegexs = system.getRegexs("config_tether_wifi_regexs")
bluetoothRegexs = system.getRegexs("config_tether_bluetooth_regexs") bluetoothRegexs = system.getRegexs("config_tether_bluetooth_regexs")
} }
wimaxRegexs = system.getRegexs("config_tether_wimax_regexs")
// available since Android 4.0: https://android.googlesource.com/platform/frameworks/base/+/c96a667162fab44a250503caccb770109a9cb69a // available since Android 4.0: https://android.googlesource.com/platform/frameworks/base/+/c96a667162fab44a250503caccb770109a9cb69a
ethernetRegex = system.second.getString(system.second.getIdentifier( ethernetRegex = system.second.getString(system.second.getIdentifier(
"config_ethernet_iface_regex", "string", system.first)).run { if (isEmpty()) null else toPattern() } "config_ethernet_iface_regex", "string", system.first)).run { if (isEmpty()) null else toPattern() }
@@ -115,7 +112,6 @@ enum class TetherType(@DrawableRes val icon: Int) {
usbRegexs.any { it.matcher(iface).matches() } -> USB usbRegexs.any { it.matcher(iface).matches() } -> USB
bluetoothRegexs.any { it.matcher(iface).matches() } -> BLUETOOTH bluetoothRegexs.any { it.matcher(iface).matches() } -> BLUETOOTH
ncmRegexs.any { it.matcher(iface).matches() } -> NCM ncmRegexs.any { it.matcher(iface).matches() } -> NCM
wimaxRegexs.any { it.matcher(iface).matches() } -> WIMAX
ethernetRegex?.matcher(iface)?.matches() == true -> ETHERNET ethernetRegex?.matcher(iface)?.matches() == true -> ETHERNET
else -> NONE else -> NONE
} }

View File

@@ -1,10 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12c0,5.52 4.48,10 10,10s10,-4.48 10,-10C22,6.48 17.52,2 12,2zM8.46,14.45L7.1,13.83c0.28,-0.61 0.41,-1.24 0.4,-1.86c-0.01,-0.63 -0.14,-1.24 -0.4,-1.8l1.36,-0.63c0.35,0.75 0.53,1.56 0.54,2.4C9.01,12.8 8.83,13.64 8.46,14.45zM11.53,16.01l-1.3,-0.74c0.52,-0.92 0.78,-1.98 0.78,-3.15c0,-1.19 -0.27,-2.33 -0.8,-3.4l1.34,-0.67c0.64,1.28 0.96,2.65 0.96,4.07C12.51,13.55 12.18,14.86 11.53,16.01zM14.67,17.33l-1.35,-0.66c0.78,-1.6 1.18,-3.18 1.18,-4.69c0,-1.51 -0.4,-3.07 -1.18,-4.64l1.34,-0.67C15.56,8.45 16,10.23 16,11.98C16,13.72 15.56,15.52 14.67,17.33z"/>
</vector>