Support showing supported channels
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package be.mygod.vpnhotspot.util
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.net.wifi.SoftApConfiguration
|
||||
import android.net.wifi.p2p.WifiP2pConfig
|
||||
import androidx.annotation.RequiresApi
|
||||
import timber.log.Timber
|
||||
@@ -28,6 +29,11 @@ object UnblockCentral {
|
||||
}
|
||||
}
|
||||
|
||||
@get:RequiresApi(31)
|
||||
val SoftApConfiguration_BAND_TYPES get() = init.let {
|
||||
SoftApConfiguration::class.java.getField("BAND_TYPES").get(null) as IntArray
|
||||
}
|
||||
|
||||
@RequiresApi(31)
|
||||
fun getApInstanceIdentifier(clazz: Class<*>) = init.let { clazz.getDeclaredMethod("getApInstanceIdentifier") }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user