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) {

View File

@ -928,6 +928,7 @@
<string name="title_hint_alias">Long press an identity to display options, like copy to create alias identities</string>
<string name="title_service_auth">The email server said: \'%1$s\'</string>
<string name="title_service_vpn">This might be caused by the VPN that is being used</string>
<string name="title_service_token">The Android account manager could be blocked by a VPN, firewall, ad blocker, etc., preventing it from obtaining an access token</string>
<string name="title_service_port">Please double check the port number</string>
<string name="title_service_protocol">Please double check the protocol (SSL/TLS or STARTTLS)</string>