From 12a3ed62d16f70a706e52ad6cd0b54fb189d997f Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 24 Aug 2018 17:28:36 +0000 Subject: [PATCH] Skip reporting store connection exception --- .../main/java/eu/faircode/email/ServiceSynchronize.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 12429f25..8a8f0dfa 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -40,6 +40,7 @@ import android.preference.PreferenceManager; import android.text.TextUtils; import android.util.Log; +import com.sun.mail.iap.ConnectionException; import com.sun.mail.iap.ProtocolException; import com.sun.mail.imap.AppendUID; import com.sun.mail.imap.IMAPFolder; @@ -326,12 +327,16 @@ public class ServiceSynchronize extends LifecycleService { // - "This operation is not allowed on a closed folder" // - can happen when syncing message + // ConnectionException + // - failed to create new store connection (connectivity) + // MailConnectException - // - on connectity problems when connecting to stoe + // - on connectity problems when connecting to store if (!(ex instanceof MailConnectException) && !(ex instanceof FolderClosedException) && !(ex instanceof IllegalStateException) && + !(ex instanceof MessagingException && ex.getCause() instanceof ConnectionException) && !(ex instanceof MessagingException && ex.getCause() instanceof SocketTimeoutException)) { String action; if (TextUtils.isEmpty(account))