mirror of
https://github.com/PhilKes/NotallyX.git
synced 2025-06-28 12:19:55 +00:00
Finish LockedActivity for any authentication error
This commit is contained in:
parent
8d5e0a0764
commit
32c68be85d
2 changed files with 20 additions and 3 deletions
|
@ -49,9 +49,13 @@ abstract class LockedActivity<T : ViewBinding> : AppCompatActivity() {
|
|||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (requestCode == REQUEST_BIOMETRIC_AUTHENTICATION && resultCode == Activity.RESULT_OK) {
|
||||
notallyXApplication.isLocked = false
|
||||
show()
|
||||
if (requestCode == REQUEST_BIOMETRIC_AUTHENTICATION) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
notallyXApplication.isLocked = false
|
||||
show()
|
||||
} else {
|
||||
finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ private fun showBiometricOrPinPrompt(
|
|||
super.onAuthenticationFailed()
|
||||
onFailure.invoke()
|
||||
}
|
||||
|
||||
override fun onAuthenticationError(errorCode: Int, errString: CharSequence?) {
|
||||
super.onAuthenticationError(errorCode, errString)
|
||||
onFailure.invoke()
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -140,6 +145,14 @@ private fun showBiometricOrPinPrompt(
|
|||
super.onAuthenticationFailed()
|
||||
onFailure.invoke()
|
||||
}
|
||||
|
||||
override fun onAuthenticationError(
|
||||
errorCode: Int,
|
||||
errString: CharSequence?,
|
||||
) {
|
||||
super.onAuthenticationError(errorCode, errString)
|
||||
onFailure.invoke()
|
||||
}
|
||||
},
|
||||
null,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue