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

@@ -319,10 +319,9 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(),
if (tethering.active == null) tethering.activeFailureCause?.readableMessage else null,
baseError).joinToString("\n")
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
}
}