mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-30 19:56:10 +00:00
Prevent crash
This commit is contained in:
parent
7060a62817
commit
8f23b74d2b
1 changed files with 8 additions and 8 deletions
|
@ -868,9 +868,14 @@ public class Helper {
|
||||||
if (errorCode != BiometricPrompt.ERROR_NEGATIVE_BUTTON &&
|
if (errorCode != BiometricPrompt.ERROR_NEGATIVE_BUTTON &&
|
||||||
errorCode != BiometricPrompt.ERROR_CANCELED &&
|
errorCode != BiometricPrompt.ERROR_CANCELED &&
|
||||||
errorCode != BiometricPrompt.ERROR_USER_CANCELED)
|
errorCode != BiometricPrompt.ERROR_USER_CANCELED)
|
||||||
ToastEx.makeText(activity,
|
handler.post(new Runnable() {
|
||||||
errString + " (" + errorCode + ")",
|
@Override
|
||||||
Toast.LENGTH_LONG).show();
|
public void run() {
|
||||||
|
ToastEx.makeText(activity,
|
||||||
|
"Error " + errorCode + ": " + errString,
|
||||||
|
Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
handler.post(cancelled);
|
handler.post(cancelled);
|
||||||
}
|
}
|
||||||
|
@ -878,7 +883,6 @@ public class Helper {
|
||||||
@Override
|
@Override
|
||||||
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
|
public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
|
||||||
Log.i("Biometric succeeded");
|
Log.i("Biometric succeeded");
|
||||||
|
|
||||||
setAuthenticated(activity);
|
setAuthenticated(activity);
|
||||||
handler.post(authenticated);
|
handler.post(authenticated);
|
||||||
}
|
}
|
||||||
|
@ -886,10 +890,6 @@ public class Helper {
|
||||||
@Override
|
@Override
|
||||||
public void onAuthenticationFailed() {
|
public void onAuthenticationFailed() {
|
||||||
Log.w("Biometric failed");
|
Log.w("Biometric failed");
|
||||||
|
|
||||||
ToastEx.makeText(activity,
|
|
||||||
R.string.title_unexpected_error,
|
|
||||||
Toast.LENGTH_LONG).show();
|
|
||||||
handler.post(cancelled);
|
handler.post(cancelled);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue