missing runOnUiThread
This commit is contained in:
parent
2beb1b1c3d
commit
695ba6826b
1 changed files with 7 additions and 2 deletions
|
@ -5,6 +5,7 @@ import androidx.biometric.BiometricPrompt
|
||||||
import androidx.fragment.app.FragmentActivity
|
import androidx.fragment.app.FragmentActivity
|
||||||
import info.nightscout.androidaps.R
|
import info.nightscout.androidaps.R
|
||||||
import info.nightscout.androidaps.utils.ToastUtils
|
import info.nightscout.androidaps.utils.ToastUtils
|
||||||
|
import info.nightscout.androidaps.utils.extensions.runOnUiThread
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
|
|
||||||
object BiometricCheck {
|
object BiometricCheck {
|
||||||
|
@ -24,7 +25,9 @@ object BiometricCheck {
|
||||||
BiometricConstants.ERROR_USER_CANCELED -> {
|
BiometricConstants.ERROR_USER_CANCELED -> {
|
||||||
ToastUtils.showToastInUiThread(activity.baseContext, errString.toString())
|
ToastUtils.showToastInUiThread(activity.baseContext, errString.toString())
|
||||||
// fallback to master password
|
// fallback to master password
|
||||||
passwordCheck.queryPassword(activity, R.string.master_password, R.string.key_master_password, { ok?.run() }, { cancel?.run() }, { fail?.run() })
|
runOnUiThread(Runnable {
|
||||||
|
passwordCheck.queryPassword(activity, R.string.master_password, R.string.key_master_password, { ok?.run() }, { cancel?.run() }, { fail?.run() })
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
BiometricConstants.ERROR_NEGATIVE_BUTTON ->
|
BiometricConstants.ERROR_NEGATIVE_BUTTON ->
|
||||||
|
@ -34,7 +37,9 @@ object BiometricCheck {
|
||||||
ToastUtils.showToastInUiThread(activity.baseContext, errString.toString())
|
ToastUtils.showToastInUiThread(activity.baseContext, errString.toString())
|
||||||
// no pin set
|
// no pin set
|
||||||
// fallback to master password
|
// fallback to master password
|
||||||
passwordCheck.queryPassword(activity, R.string.master_password, R.string.key_master_password, { ok?.run() }, { cancel?.run() }, { fail?.run() })
|
runOnUiThread(Runnable {
|
||||||
|
passwordCheck.queryPassword(activity, R.string.master_password, R.string.key_master_password, { ok?.run() }, { cancel?.run() }, { fail?.run() })
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
BiometricConstants.ERROR_NO_SPACE,
|
BiometricConstants.ERROR_NO_SPACE,
|
||||||
|
|
Loading…
Reference in a new issue