Browse Source

Suppress connection failure messages

main
M66B 6 years ago
parent
commit
52158a8672
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      app/src/main/java/eu/faircode/email/ServiceSynchronize.java

+ 3
- 2
app/src/main/java/eu/faircode/email/ServiceSynchronize.java View File

@ -372,12 +372,13 @@ public class ServiceSynchronize extends LifecycleService {
if (!(ex instanceof MailConnectException) && if (!(ex instanceof MailConnectException) &&
!(ex instanceof FolderClosedException) && !(ex instanceof FolderClosedException) &&
!(ex instanceof IllegalStateException) && !(ex instanceof IllegalStateException) &&
!(ex instanceof AuthenticationFailedException) && // Also: Too many simultaneous connections)
!(ex instanceof AuthenticationFailedException) && // Also: Too many simultaneous connections
!(ex instanceof StoreClosedException) && !(ex instanceof StoreClosedException) &&
!(ex instanceof MessagingException && ex.getCause() instanceof ConnectionException) && !(ex instanceof MessagingException && ex.getCause() instanceof ConnectionException) &&
!(ex instanceof MessagingException && ex.getCause() instanceof SocketException) && !(ex instanceof MessagingException && ex.getCause() instanceof SocketException) &&
!(ex instanceof MessagingException && ex.getCause() instanceof SocketTimeoutException) && !(ex instanceof MessagingException && ex.getCause() instanceof SocketTimeoutException) &&
!(ex instanceof MessagingException && ex.getCause() instanceof SSLException)) {
!(ex instanceof MessagingException && ex.getCause() instanceof SSLException) &&
!(ex instanceof MessagingException && "connection failure".equals(ex.getMessage()))) {
NotificationManager nm = getSystemService(NotificationManager.class); NotificationManager nm = getSystemService(NotificationManager.class);
nm.notify(action, 1, getNotificationError(action, ex).build()); nm.notify(action, 1, getNotificationError(action, ex).build());
} }


Loading…
Cancel
Save