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 87bf7403..ebf5162b 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetherManager.kt @@ -267,7 +267,15 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(), override val tetherType get() = TetherType.WIFI override val type get() = VIEW_TYPE_WIFI_LEGACY - override fun start() = WifiApManager.start() - override fun stop() = WifiApManager.stop() + override fun start() = try { + WifiApManager.start() + } catch (e: Exception) { + onException(e) + } + override fun stop() = try { + WifiApManager.stop() + } catch (e: Exception) { + onException(e) + } } } diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringTileService.kt b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringTileService.kt index 86488ab2..ca4e2e62 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringTileService.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/manage/TetheringTileService.kt @@ -242,7 +242,15 @@ sealed class TetheringTileService : IpNeighbourMonitoringTileService(), Tetherin override val tetherType get() = TetherType.WIFI override val icon get() = R.drawable.ic_device_wifi_tethering - override fun start() = WifiApManager.start() - override fun stop() = WifiApManager.stop() + override fun start() = try { + WifiApManager.start() + } catch (e: Exception) { + onException(e) + } + override fun stop() = try { + WifiApManager.stop() + } catch (e: Exception) { + onException(e) + } } }