diff --git a/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java b/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java index 72518ad58..61beb9a6b 100644 --- a/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java +++ b/app/src/main/java/fr/free/nrw/commons/CommonsApplication.java @@ -91,6 +91,7 @@ public class CommonsApplication extends Application { @Override public void onCreate() { super.onCreate(); + ACRA.init(this); if (BuildConfig.DEBUG) { //FIXME: Traceur should be disabled for release builds until error fixed //See https://github.com/commons-app/apps-android-commons/issues/1877 @@ -118,7 +119,6 @@ public class CommonsApplication extends Application { // Empty temp directory in case some temp files are created and never removed. ContributionUtils.emptyTemporaryDirectory(); - initAcra(); if (BuildConfig.DEBUG && !isRoboUnitTest()) { Stetho.initializeWithDefaults(this); } @@ -152,16 +152,6 @@ public class CommonsApplication extends Application { Timber.plant(new Timber.DebugTree()); } - /** - * Remove ACRA's UncaughtExceptionHandler - * We do this because ACRA's handler spawns a new process possibly screwing up with a few things - */ - private void initAcra() { - Thread.UncaughtExceptionHandler exceptionHandler = Thread.getDefaultUncaughtExceptionHandler(); - ACRA.init(this); - Thread.setDefaultUncaughtExceptionHandler(exceptionHandler); - } - public static boolean isRoboUnitTest() { return "robolectric".equals(Build.FINGERPRINT); }