Added Gmail state

This commit is contained in:
M66B
2020-10-26 09:31:10 +01:00
parent bacc2c1024
commit 8c8d3c8ddf
7 changed files with 166 additions and 82 deletions

View File

@@ -364,10 +364,9 @@ public class EmailService implements AutoCloseable {
connect(host, port, auth, user, authenticator, factory);
} catch (AuthenticationFailedException ex) {
// Refresh token
if (auth == AUTH_TYPE_GMAIL || auth == AUTH_TYPE_OAUTH) {
try {
authenticator.expire();
authenticator.refreshToken(true);
connect(host, port, auth, user, authenticator, factory);
} catch (Exception ex1) {
Log.e(ex1);