From 661037a3677ae7a5002bf7d3ca0ce4bcf51de397 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 1 Oct 2024 08:26:56 +0200 Subject: [PATCH] Suppress FinalizerWatchdogDaemon exceptions --- app/src/main/java/eu/faircode/email/Log.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 8d56cd207b..d315453dac 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -991,13 +991,13 @@ public class Log { at android.app.ActivityThread.handleUnbindService(ActivityThread.java:4352) java.lang.RuntimeException: Could not get application info. -  at CH0.a(PG:11) -  at org.chromium.content.browser.ChildProcessLauncherHelperImpl.a(PG:34) -  at Fn2.run(PG:5) -  at android.os.Handler.handleCallback(Handler.java:874) -  at android.os.Handler.dispatchMessage(Handler.java:100) -  at android.os.Looper.loop(Looper.java:198) -  at android.os.HandlerThread.run(HandlerThread.java:65) + at CH0.a(PG:11) + at org.chromium.content.browser.ChildProcessLauncherHelperImpl.a(PG:34) + at Fn2.run(PG:5) + at android.os.Handler.handleCallback(Handler.java:874) + at android.os.Handler.dispatchMessage(Handler.java:100) + at android.os.Looper.loop(Looper.java:198) + at android.os.HandlerThread.run(HandlerThread.java:65) java.lang.RuntimeException: Unable to create service eu.faircode.email.ServiceSynchronize: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.List android.os.IUserManager.getProfiles(int, boolean)' on a null object reference at android.app.ActivityThread.handleCreateService(ActivityThread.java:2739) @@ -1276,6 +1276,11 @@ public class Log { */ return false; + if (ex instanceof NullPointerException) + for (StackTraceElement ste : stack) + if ("java.lang.Daemons$FinalizerWatchdogDaemon".equals(ste.getClassName())) + return false; + if (ex instanceof IndexOutOfBoundsException && stack.length > 0 && "android.text.SpannableStringInternal".equals(stack[0].getClassName()) &&