Handle errors in WifiLegacy
This commit is contained in:
@@ -267,7 +267,15 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(),
|
|||||||
override val tetherType get() = TetherType.WIFI
|
override val tetherType get() = TetherType.WIFI
|
||||||
override val type get() = VIEW_TYPE_WIFI_LEGACY
|
override val type get() = VIEW_TYPE_WIFI_LEGACY
|
||||||
|
|
||||||
override fun start() = WifiApManager.start()
|
override fun start() = try {
|
||||||
override fun stop() = WifiApManager.stop()
|
WifiApManager.start()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
onException(e)
|
||||||
|
}
|
||||||
|
override fun stop() = try {
|
||||||
|
WifiApManager.stop()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
onException(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,7 +242,15 @@ sealed class TetheringTileService : IpNeighbourMonitoringTileService(), Tetherin
|
|||||||
override val tetherType get() = TetherType.WIFI
|
override val tetherType get() = TetherType.WIFI
|
||||||
override val icon get() = R.drawable.ic_device_wifi_tethering
|
override val icon get() = R.drawable.ic_device_wifi_tethering
|
||||||
|
|
||||||
override fun start() = WifiApManager.start()
|
override fun start() = try {
|
||||||
override fun stop() = WifiApManager.stop()
|
WifiApManager.start()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
onException(e)
|
||||||
|
}
|
||||||
|
override fun stop() = try {
|
||||||
|
WifiApManager.stop()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
onException(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user