From 21de3f57d5af719696fdc3447f79d0000a9dcee5 Mon Sep 17 00:00:00 2001 From: Mygod Date: Sun, 15 May 2022 16:50:55 -0400 Subject: [PATCH] Attempt to support 60GHz on Android 11 on select OEMs --- .../mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt index c79657ef..c5d78780 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApDialogFragment.kt @@ -67,12 +67,10 @@ class WifiApDialogFragment : AlertDialogFragment { - val channels6G = channels5G + - (1..233).map { ChannelOption(SoftApConfigurationCompat.BAND_6GHZ, it) } - if (Build.VERSION.SDK_INT >= 31) { - genAutoOptions(SoftApConfigurationCompat.BAND_ANY_31) + - channels6G + (1..6).map { ChannelOption(SoftApConfigurationCompat.BAND_60GHZ, it) } - } else genAutoOptions(SoftApConfigurationCompat.BAND_ANY_30) + channels6G + genAutoOptions(SoftApConfigurationCompat.BAND_ANY_31) + + channels5G + + (1..233).map { ChannelOption(SoftApConfigurationCompat.BAND_6GHZ, it) } + + (1..6).map { ChannelOption(SoftApConfigurationCompat.BAND_60GHZ, it) } } in 28 until 30 -> p2pSafeOptions else -> listOf(ChannelOption(SoftApConfigurationCompat.BAND_2GHZ),