Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}

Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/com/philkes/notallyx/utils/security/LockUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ private fun showBiometricOrPinPrompt(
super.onAuthenticationFailed()
onFailure.invoke()
}

override fun onAuthenticationError(errorCode: Int, errString: CharSequence?) {
super.onAuthenticationError(errorCode, errString)
onFailure.invoke()
}
},
)
}
Expand Down Expand Up @@ -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,
)
Expand Down