diff --git a/app/src/dev/java/mihon/core/firebase/Firebase.kt b/app/src/dev/java/mihon/core/firebase/Firebase.kt new file mode 100644 index 0000000000..264083fe31 --- /dev/null +++ b/app/src/dev/java/mihon/core/firebase/Firebase.kt @@ -0,0 +1,7 @@ + +import android.content.Context +import eu.kanade.domain.base.BasePreferences + +object Firebase { + fun setup(context: Context, preference: BasePreferences) = Unit +} diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index c9af1e4106..70a7317a6a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi +import Firebase import android.annotation.SuppressLint import android.app.Application import android.app.PendingIntent @@ -21,13 +22,11 @@ import coil3.network.okhttp.OkHttpNetworkFetcherFactory import coil3.request.allowRgb565 import coil3.request.crossfade import coil3.util.DebugLogger -//import com.google.firebase.crashlytics.FirebaseCrashlytics import dev.mihon.injekt.patchInjekt import eu.kanade.domain.DomainModule import eu.kanade.domain.base.BasePreferences import eu.kanade.domain.ui.UiPreferences import eu.kanade.domain.ui.model.setAppCompatDelegateThemeMode -import eu.kanade.tachiyomi.core.security.SecurityPreferences import eu.kanade.tachiyomi.crash.CrashActivity import eu.kanade.tachiyomi.crash.GlobalExceptionHandler import eu.kanade.tachiyomi.data.coil.BufferedSourceFetcher @@ -69,7 +68,6 @@ import java.security.Security class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factory { private val basePreferences: BasePreferences by injectLazy() - private val securityPreferences: SecurityPreferences by injectLazy() private val networkPreferences: NetworkPreferences by injectLazy() private val disableIncognitoReceiver = DisableIncognitoReceiver() @@ -78,7 +76,7 @@ class App : Application(), DefaultLifecycleObserver, SingletonImageLoader.Factor override fun onCreate() { super.onCreate() patchInjekt() - //FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(securityPreferences.crashlytics().get()) + Firebase.setup(applicationContext, basePreferences) GlobalExceptionHandler.initialize(applicationContext, CrashActivity::class.java) diff --git a/app/src/standard/AndroidManifest.xml b/app/src/standard/AndroidManifest.xml index f6a02077a4..9d0be9170f 100644 --- a/app/src/standard/AndroidManifest.xml +++ b/app/src/standard/AndroidManifest.xml @@ -20,6 +20,15 @@ tools:node="remove" /> + + + + + + FirebaseAnalytics.getInstance(context).setAnalyticsCollectionEnabled(enabled) + } + } +}