diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index ed00eaf313..f8977ddcb5 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -471,6 +471,7 @@ public class Log { if (ex instanceof IllegalStateException && (no_internet.equals(ex.getMessage()) || + "Token refreshed".equals(ex.getMessage()) || "Not connected".equals(ex.getMessage()) || "This operation is not allowed on a closed folder".equals(ex.getMessage()))) return false; @@ -1504,7 +1505,8 @@ public class Log { return null; if (ex instanceof IllegalStateException && - ("Not connected".equals(ex.getMessage()) || + ("Token refreshed".equals(ex.getMessage()) || + "Not connected".equals(ex.getMessage()) || "This operation is not allowed on a closed folder".equals(ex.getMessage()))) return null; } diff --git a/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java b/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java index c6128ef7a9..494397499d 100644 --- a/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java +++ b/app/src/main/java/eu/faircode/email/ServiceAuthenticator.java @@ -143,7 +143,7 @@ public class ServiceAuthenticator extends Authenticator { Log.w(ex); } - throw new IllegalStateException("Token needs refresh"); + throw new IllegalStateException("Token refreshed"); } }