Clear error when permission is granted

This commit is contained in:
Mygod
2021-06-11 01:34:53 +08:00
parent edca8ed013
commit 282fc71814
2 changed files with 6 additions and 2 deletions

View File

@@ -109,6 +109,7 @@ class BluetoothTethering(context: Context, val stateListener: () -> Unit) :
private val receiver = broadcastReceiver { _, _ -> stateListener() }
fun ensureInit(context: Context) {
activeFailureCause = null
if (pan == null) try {
pan = pan(context, this)
} catch (e: ReflectiveOperationException) {