Android account manager might be blocked

This commit is contained in:
M66B
2021-12-26 10:59:31 +01:00
parent 2aa333ee17
commit 9034c9360a
2 changed files with 6 additions and 1 deletions

View File

@@ -446,8 +446,12 @@ public class EmailService implements AutoCloseable {
connect(host, port, auth, user, factory);
} catch (Exception ex1) {
Log.e(ex1);
String msg = ex.getMessage();
if (auth == AUTH_TYPE_GMAIL &&
msg != null && msg.endsWith("Invalid credentials (Failure)"))
msg += "; " + context.getString(R.string.title_service_token);
throw new AuthenticationFailedException(
context.getString(R.string.title_service_auth, ex.getMessage()),
context.getString(R.string.title_service_auth, msg),
ex.getNextException());
}
} else if (purpose == PURPOSE_CHECK) {