setDeviceCredentialAllowed disabled
This commit is contained in:
parent
695ba6826b
commit
e97aafb143
2 changed files with 6 additions and 6 deletions
|
@ -755,6 +755,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
|
|
||||||
// ****** GRAPH *******
|
// ****** GRAPH *******
|
||||||
GlobalScope.launch(Dispatchers.Main) {
|
GlobalScope.launch(Dispatchers.Main) {
|
||||||
|
overview_bggraph?: return@launch
|
||||||
val graphData = GraphData(injector, overview_bggraph, iobCobCalculatorPlugin)
|
val graphData = GraphData(injector, overview_bggraph, iobCobCalculatorPlugin)
|
||||||
val secondaryGraphsData: ArrayList<GraphData> = ArrayList()
|
val secondaryGraphsData: ArrayList<GraphData> = ArrayList()
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,9 @@ object BiometricCheck {
|
||||||
BiometricConstants.ERROR_HW_UNAVAILABLE,
|
BiometricConstants.ERROR_HW_UNAVAILABLE,
|
||||||
BiometricConstants.ERROR_HW_NOT_PRESENT,
|
BiometricConstants.ERROR_HW_NOT_PRESENT,
|
||||||
BiometricConstants.ERROR_NO_BIOMETRICS ->
|
BiometricConstants.ERROR_NO_BIOMETRICS ->
|
||||||
// call ok, because it's not possible to bypass it when biometrics fail
|
runOnUiThread(Runnable {
|
||||||
// ok?.run()
|
passwordCheck.queryPassword(activity, R.string.master_password, R.string.key_master_password, { ok?.run() }, { cancel?.run() }, { fail?.run() })
|
||||||
// changed to fail as you can use PIN instead with setDeviceCredentialAllowed enabled
|
})
|
||||||
fail?.run()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +68,8 @@ object BiometricCheck {
|
||||||
val promptInfo = BiometricPrompt.PromptInfo.Builder()
|
val promptInfo = BiometricPrompt.PromptInfo.Builder()
|
||||||
.setTitle(activity.getString(title))
|
.setTitle(activity.getString(title))
|
||||||
.setDescription(activity.getString(R.string.biometric_title))
|
.setDescription(activity.getString(R.string.biometric_title))
|
||||||
// .setNegativeButtonText(activity.getString(R.string.cancel)) // not possible with setDeviceCredentialAllowed
|
.setNegativeButtonText(activity.getString(R.string.cancel)) // not possible with setDeviceCredentialAllowed
|
||||||
.setDeviceCredentialAllowed(true)
|
// .setDeviceCredentialAllowed(true) // setDeviceCredentialAllowed creates new activity when PIN is requested, activity.fragmentManager crash afterwards
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
biometricPrompt.authenticate(promptInfo)
|
biometricPrompt.authenticate(promptInfo)
|
||||||
|
|
Loading…
Reference in a new issue