Fix turning off bluetooth tethering

This commit is contained in:
Mygod
2021-06-11 01:46:51 +08:00
parent 282fc71814
commit 54c9ae0cec
3 changed files with 34 additions and 24 deletions

View File

@@ -151,10 +151,9 @@ sealed class TetheringTileService : IpNeighbourMonitoringTileService(), Tetherin
override val labelString get() = R.string.tethering_manage_bluetooth
override val tetherType get() = TetherType.BLUETOOTH
override fun start() = BluetoothTethering.start(this)
override fun start() = tethering!!.start(this)
override fun stop() {
TetheringManager.stopTethering(TetheringManager.TETHERING_BLUETOOTH, this::onException)
Thread.sleep(1) // give others a room to breathe
tethering!!.stop(this::onException)
onTetheringStarted() // force flush state
}