mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Sanitize read/write errors
This commit is contained in:
parent
78e9ed5dd9
commit
deab3432b5
1 changed files with 8 additions and 0 deletions
|
@ -99,6 +99,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
|
||||
import javax.mail.FolderClosedException;
|
||||
import javax.mail.MessageRemovedException;
|
||||
import javax.mail.MessagingException;
|
||||
|
||||
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
|
||||
import static androidx.browser.customtabs.CustomTabsService.ACTION_CUSTOM_TABS_CONNECTION;
|
||||
|
@ -426,6 +427,13 @@ public class Helper {
|
|||
if (ex instanceof MessageRemovedException)
|
||||
return null;
|
||||
|
||||
if (ex instanceof MessagingException &&
|
||||
ex.getCause() instanceof ConnectionException &&
|
||||
ex.getCause().getMessage() != null &&
|
||||
(ex.getCause().getMessage().contains("Read error") ||
|
||||
ex.getCause().getMessage().contains("Write error")))
|
||||
return null;
|
||||
|
||||
if (ex instanceof IOException &&
|
||||
ex.getCause() instanceof MessageRemovedException)
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue