From fb9084f93d9466023424db5d39297f4e0590fa4c Mon Sep 17 00:00:00 2001 From: Joe Gambino Date: Fri, 9 Oct 2020 17:37:35 -0700 Subject: [PATCH] only report android crashes in release mode --- .../java/com/expensify/chat/MainApplication.java | 13 +++++++------ firebase.json | 1 - 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/MainApplication.java b/android/app/src/main/java/com/expensify/chat/MainApplication.java index d7624fd87df6..3f4b954717ea 100644 --- a/android/app/src/main/java/com/expensify/chat/MainApplication.java +++ b/android/app/src/main/java/com/expensify/chat/MainApplication.java @@ -1,12 +1,10 @@ package com.expensify.chat; -import android.app.Application; import android.content.Context; import androidx.multidex.MultiDexApplication; import com.facebook.react.PackageList; import com.facebook.react.ReactApplication; -import com.lugg.ReactNativeConfig.ReactNativeConfigPackage; -import com.reactnativecommunity.asyncstorage.AsyncStoragePackage; +import com.google.firebase.crashlytics.FirebaseCrashlytics; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; @@ -45,9 +43,12 @@ public ReactNativeHost getReactNativeHost() { @Override public void onCreate() { - super.onCreate(); - SoLoader.init(this, /* native exopackage */ false); - initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); + initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); + if (BuildConfig.DEBUG) { + FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false); + } } /** diff --git a/firebase.json b/firebase.json index 5e0035dc8c48..b1d3f9a4f604 100644 --- a/firebase.json +++ b/firebase.json @@ -1,6 +1,5 @@ { "react-native": { - "crashlytics_auto_collection_enabled": true, "crashlytics_disable_auto_disabler": true, "crashlytics_debug_enabled": false, "crashlytics_ndk_enabled": true