Skip reporting finalizer crash

This commit is contained in:
M66B 2019-05-11 09:21:48 +02:00
parent 6e390c2e49
commit 443093f97e
1 changed files with 6 additions and 0 deletions

View File

@ -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;