Attempt to support 60GHz on Android 11 on select OEMs

This commit is contained in:
Mygod
2022-05-15 16:50:55 -04:00
parent 8a587168c9
commit 21de3f57d5

View File

@@ -67,12 +67,10 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
private val softApOptions by lazy { private val softApOptions by lazy {
when (Build.VERSION.SDK_INT) { when (Build.VERSION.SDK_INT) {
in 30..Int.MAX_VALUE -> { in 30..Int.MAX_VALUE -> {
val channels6G = channels5G +
(1..233).map { ChannelOption(SoftApConfigurationCompat.BAND_6GHZ, it) }
if (Build.VERSION.SDK_INT >= 31) {
genAutoOptions(SoftApConfigurationCompat.BAND_ANY_31) + genAutoOptions(SoftApConfigurationCompat.BAND_ANY_31) +
channels6G + (1..6).map { ChannelOption(SoftApConfigurationCompat.BAND_60GHZ, it) } channels5G +
} else genAutoOptions(SoftApConfigurationCompat.BAND_ANY_30) + channels6G (1..233).map { ChannelOption(SoftApConfigurationCompat.BAND_6GHZ, it) } +
(1..6).map { ChannelOption(SoftApConfigurationCompat.BAND_60GHZ, it) }
} }
in 28 until 30 -> p2pSafeOptions in 28 until 30 -> p2pSafeOptions
else -> listOf(ChannelOption(SoftApConfigurationCompat.BAND_2GHZ), else -> listOf(ChannelOption(SoftApConfigurationCompat.BAND_2GHZ),