This commit is contained in:
tarsin committed 2022-07-10 19:23:36 +08:00
1 parent 2110e1b102
commit bb5799b414
1 file changed
+15 -3
@@ -39,7 +39,7 @@ class SecurityScene : SolidScene() {
if (isAuthenticationSupported(requireContext()))
startAuthentication(getString(R.string.settings_privacy_require_unlock))
else
startSceneForCheckStep(CHECK_STEP_SECURITY, arguments)
onSuccess()
}
private fun startAuthentication(
@@ -61,8 +61,15 @@ class SecurityScene : SolidScene() {
activity: FragmentActivity?,
result: BiometricPrompt.AuthenticationResult
) {
super.onAuthenticationSucceeded(activity, result)
startSceneForCheckStep(CHECK_STEP_SECURITY, arguments)
onSuccess()
}
override fun onAuthenticationError(
activity: FragmentActivity?,
errorCode: Int,
errString: CharSequence
) {
finish()
}
}
@@ -73,4 +80,9 @@ class SecurityScene : SolidScene() {
.canAuthenticate(authenticators) == BiometricManager.BIOMETRIC_SUCCESS
}
}
private fun onSuccess() {
startSceneForCheckStep(CHECK_STEP_SECURITY, arguments)
finish()
}
}