diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/SoftApConfigurationCompat.kt b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/SoftApConfigurationCompat.kt index f3224a42..4c6ea3f8 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/SoftApConfigurationCompat.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/net/wifi/SoftApConfigurationCompat.kt @@ -8,6 +8,7 @@ import android.os.Build import android.os.Parcelable import android.util.SparseIntArray import androidx.annotation.RequiresApi +import be.mygod.vpnhotspot.BuildConfig import be.mygod.vpnhotspot.net.MacAddressCompat import be.mygod.vpnhotspot.net.MacAddressCompat.Companion.toCompat import be.mygod.vpnhotspot.net.monitor.TetherTimeoutMonitor @@ -95,6 +96,7 @@ data class SoftApConfigurationCompat( "WPA3-OWE Transition", "WPA3-OWE", ) + val TIMEOUT_DEFAULT = if (BuildConfig.TARGET_SDK >= 33 && Build.VERSION.SDK_INT >= 33) -1L else 0L private val qrSanitizer = Regex("([\\\\\":;,])") 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 ead5847d..24851c13 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 @@ -131,7 +131,7 @@ class WifiApDialogFragment : AlertDialogFragment - if (text.isNullOrEmpty()) 0 else text.toString().toLong() + if (text.isNullOrEmpty()) defaultTimeout else text.toString().toLong() } if (Build.VERSION.SDK_INT >= 23 || arg.p2pMode) channels = generateChannels() bssid = if (dialogView.bssid.length() != 0) { @@ -229,6 +229,8 @@ class WifiApDialogFragment : AlertDialogFragment= 23 || arg.p2pMode) { dialogView.bandPrimary.setSelection(locate(0)) if (Build.VERSION.SDK_INT >= 31 && !arg.p2pMode) {