show a toast if fingerprint authentication fails
This commit is contained in:
parent
705812c8bf
commit
c00cf61626
2 changed files with 6 additions and 1 deletions
|
@ -8,7 +8,9 @@ import android.widget.RelativeLayout
|
|||
import com.github.ajalt.reprint.core.AuthenticationFailureReason
|
||||
import com.github.ajalt.reprint.core.AuthenticationListener
|
||||
import com.github.ajalt.reprint.core.Reprint
|
||||
import com.simplemobiletools.commons.R
|
||||
import com.simplemobiletools.commons.extensions.baseConfig
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.helpers.PROTECTION_FINGERPRINT
|
||||
import com.simplemobiletools.commons.interfaces.HashListener
|
||||
|
@ -37,7 +39,9 @@ class FingerprintTab(context: Context, attrs: AttributeSet) : RelativeLayout(con
|
|||
}
|
||||
|
||||
override fun onFailure(failureReason: AuthenticationFailureReason, fatal: Boolean, errorMessage: CharSequence?, moduleTag: Int, errorCode: Int) {
|
||||
|
||||
if (failureReason == AuthenticationFailureReason.AUTHENTICATION_FAILED) {
|
||||
context.toast(R.string.authentication_failed)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
<string name="fingerprint">Fingerprint</string>
|
||||
<string name="add_fingerprint">Add fingerprint</string>
|
||||
<string name="place_finger">Please place your finger on the fingerprint sensor</string>
|
||||
<string name="authentication_failed">Authentication failed</string>
|
||||
<string name="protection_setup_successfully">Password setup successfully. Please reinstall the app in case you forget it.</string>
|
||||
|
||||
<!-- Times -->
|
||||
|
|
Loading…
Reference in a new issue