1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Small improvement

This commit is contained in:
M66B 2019-12-09 12:24:42 +01:00
parent 195b40a330
commit f98e3ee1fe

View file

@ -50,6 +50,7 @@ import androidx.preference.PreferenceManager;
import com.sun.mail.imap.IMAPFolder;
import java.net.SocketException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
@ -740,7 +741,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
try {
iservice.connect(account);
} 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);
nm.notify("receive:" + account.id, 1,
Core.getNotificationError(this, "error", account.name, ex)