Browse Source

Ignore dead system exception

main
M66B 6 years ago
parent
commit
b50877bfd1
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      app/src/main/java/eu/faircode/email/ApplicationEx.java

+ 6
- 0
app/src/main/java/eu/faircode/email/ApplicationEx.java View File

@ -23,6 +23,8 @@ import android.app.Application;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.os.Build;
import android.os.DeadSystemException;
import android.os.RemoteException;
import android.util.Log;
@ -95,6 +97,10 @@ public class ApplicationEx extends Application {
if (ex instanceof RemoteException)
return false;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
if (ex instanceof RuntimeException && ex.getCause() instanceof DeadSystemException)
return false;
while (ex != null) {
for (StackTraceElement ste : ex.getStackTrace())
if (ste.getClassName().startsWith(getPackageName()))


Loading…
Cancel
Save