mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
195b40a330
commit
f98e3ee1fe
|
@ -50,6 +50,7 @@ import androidx.preference.PreferenceManager;
|
||||||
|
|
||||||
import com.sun.mail.imap.IMAPFolder;
|
import com.sun.mail.imap.IMAPFolder;
|
||||||
|
|
||||||
|
import java.net.SocketException;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -740,7 +741,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
try {
|
try {
|
||||||
iservice.connect(account);
|
iservice.connect(account);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
if (ex instanceof AuthenticationFailedException) {
|
// Immediately report auth errors
|
||||||
|
if (ex instanceof AuthenticationFailedException &&
|
||||||
|
!(ex.getCause() instanceof SocketException)) {
|
||||||
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
nm.notify("receive:" + account.id, 1,
|
nm.notify("receive:" + account.id, 1,
|
||||||
Core.getNotificationError(this, "error", account.name, ex)
|
Core.getNotificationError(this, "error", account.name, ex)
|
||||||
|
|
Loading…
Reference in New Issue