mirror of https://github.com/M66B/FairEmail.git
Skip reporting finalizer crash
This commit is contained in:
parent
6e390c2e49
commit
443093f97e
|
@ -62,6 +62,7 @@ import java.util.Collections;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
|
||||
|
@ -380,6 +381,11 @@ public class ApplicationEx extends Application {
|
|||
if (ex instanceof RemoteException)
|
||||
return false;
|
||||
|
||||
if (ex instanceof TimeoutException &&
|
||||
ex.getMessage() != null &&
|
||||
ex.getMessage().startsWith("com.sun.mail.imap.IMAPStore.finalize"))
|
||||
return false;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
if (ex instanceof RuntimeException && ex.getCause() instanceof DeadSystemException)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue