mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Allow 3 bio retries
This commit is contained in:
parent
fb8585a3de
commit
6ff973375e
1 changed files with 4 additions and 1 deletions
|
@ -2040,6 +2040,8 @@ public class Helper {
|
||||||
|
|
||||||
final BiometricPrompt prompt = new BiometricPrompt(activity, executor,
|
final BiometricPrompt prompt = new BiometricPrompt(activity, executor,
|
||||||
new BiometricPrompt.AuthenticationCallback() {
|
new BiometricPrompt.AuthenticationCallback() {
|
||||||
|
private int fails = 0;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAuthenticationError(final int errorCode, @NonNull final CharSequence errString) {
|
public void onAuthenticationError(final int errorCode, @NonNull final CharSequence errString) {
|
||||||
Log.w("Authenticate biometric error " + errorCode + ": " + errString);
|
Log.w("Authenticate biometric error " + errorCode + ": " + errString);
|
||||||
|
@ -2069,7 +2071,8 @@ public class Helper {
|
||||||
@Override
|
@Override
|
||||||
public void onAuthenticationFailed() {
|
public void onAuthenticationFailed() {
|
||||||
Log.w("Authenticate biometric failed");
|
Log.w("Authenticate biometric failed");
|
||||||
ApplicationEx.getMainHandler().post(cancelled);
|
if (++fails >= 3)
|
||||||
|
ApplicationEx.getMainHandler().post(cancelled);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue