From d6824bdfcd87388c0ad65f89733b570327947cd2 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 3 Feb 2021 09:26:12 +0100 Subject: [PATCH] Ignore crash/bug in Android --- app/src/main/java/eu/faircode/email/Log.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index ec30170114..0ac93097fa 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -917,6 +917,22 @@ public class Log { */ return false; + if (ex instanceof NullPointerException && + stack.length > 0 && + "android.app.ActivityThread".equals(stack[0].getClassName()) && + "handleStopActivity".equals(stack[0].getMethodName())) + /* + Android: 6.0.1 + java.lang.NullPointerException: Attempt to read from field 'android.app.Activity android.app.ActivityThread$ActivityClientRecord.activity' on a null object reference + at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4766) + at android.app.ActivityThread.access$1400(ActivityThread.java:221) + at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1823) + at android.os.Handler.dispatchMessage(Handler.java:102) + at android.os.Looper.loop(Looper.java:158) + at android.app.ActivityThread.main(ActivityThread.java:7224) + */ + return false; + if (ex instanceof IndexOutOfBoundsException && stack.length > 0 && "android.text.SpannableStringInternal".equals(stack[0].getClassName()) &&