mirror of https://github.com/M66B/FairEmail.git
Ignore dead system exception
This commit is contained in:
parent
e285cde0b3
commit
b50877bfd1
|
@ -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…
Reference in New Issue