From cfe8b4bd048c42e8cfd995f775e6248ea7d1431f Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 28 Mar 2019 06:46:24 +0000 Subject: [PATCH] Report authentication failures --- app/src/main/java/eu/faircode/email/Core.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index ee836e64a3..4ae9a836d1 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -1727,7 +1727,9 @@ class Core { EntityLog.log(context, title + " " + Helper.formatThrowable(ex)); - if ((ex instanceof SendFailedException) || (ex instanceof AlertException)) { + if (ex instanceof AuthenticationFailedException || // Also: Too many simultaneous connections + ex instanceof AlertException || + ex instanceof SendFailedException) { NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.notify(tag, 1, getNotificationError(context, title, ex).build()); } @@ -1739,7 +1741,6 @@ class Core { !(ex instanceof MailConnectException) && !(ex instanceof FolderClosedException) && !(ex instanceof IllegalStateException) && - !(ex instanceof AuthenticationFailedException) && // Also: Too many simultaneous connections !(ex instanceof StoreClosedException) && !(ex instanceof UnknownHostException) && !(ex instanceof MessageRemovedException) &&