From 087a7728e2f9cbf1077a3f214913fb91a4324493 Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Tue, 16 Oct 2018 07:49:34 -0500 Subject: [PATCH] Report uncaught exceptions on background threads --- .../main/java/com/wbrawner/simplemarkdown/utility/Utils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/utility/Utils.java b/app/src/main/java/com/wbrawner/simplemarkdown/utility/Utils.java index 9045524..55b846e 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/utility/Utils.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/utility/Utils.java @@ -10,6 +10,8 @@ import android.os.HandlerThread; import android.preference.PreferenceManager; import android.support.v4.content.ContextCompat; +import org.acra.ACRA; + import java.io.Closeable; import java.io.File; import java.io.IOException; @@ -102,8 +104,7 @@ public class Utils { HandlerThread handlerThread = new HandlerThread(name); handlerThread.start(); handlerThread.setUncaughtExceptionHandler((t, e) -> { - // TODO: Report this? -// Crashlytics.logException(e); + ACRA.getErrorReporter().handleException(e); t.interrupt(); }); return new Handler(handlerThread.getLooper());