diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt index 9d60dcb9..f887d55d 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt @@ -170,7 +170,7 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(), } @Suppress("DEPRECATION") - @Deprecated("Not usable since API 25") + @Deprecated("Not usable since API 26, malfunctioning on API 25") class WifiLegacy(parent: TetheringFragment) : TetherManager(parent) { override val title get() = parent.getString(R.string.tethering_manage_wifi_legacy) override val tetherType get() = TetherType.WIFI diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringFragment.kt index a4319fe9..ec392310 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringFragment.kt @@ -69,7 +69,7 @@ class TetheringFragment : Fragment(), ServiceConnection { list.addAll(tetherManagers) tetherManagers.forEach { it.updateErrorMessage(erroredIfaces) } } - if (Build.VERSION.SDK_INT < 25) { + if (Build.VERSION.SDK_INT < 26) { list.add(wifiManagerLegacy) wifiManagerLegacy.onTetheringStarted() } diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApManager.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApManager.kt index 9b793fab..653d3f78 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/WifiApManager.kt @@ -25,12 +25,12 @@ object WifiApManager { private fun WifiManager.setWifiApEnabled(wifiConfig: WifiConfiguration?, enabled: Boolean) = setWifiApEnabled.invoke(this, wifiConfig, enabled) as Boolean - @Deprecated("No longer usable since API 25.") + @Deprecated("Not usable since API 26, malfunctioning on API 25") fun start(wifiConfig: WifiConfiguration? = null) { app.wifi.isWifiEnabled = false app.wifi.setWifiApEnabled(wifiConfig, true) } - @Deprecated("No longer usable since API 25.") + @Deprecated("Not usable since API 26") fun stop() { app.wifi.setWifiApEnabled(null, false) app.wifi.isWifiEnabled = true