From 750f4a89f9818ea591e829e0010f984ce038ac7e Mon Sep 17 00:00:00 2001 From: Matthias Klass Date: Sat, 6 Jul 2024 11:28:38 +0200 Subject: [PATCH] Remove crashlytics --- app/build-includes/android.gradle | 1 - app/build.gradle.kts | 7 +------ .../fhem/appwidget/update/AppWidgetInstanceManager.kt | 2 -- .../java/li/klass/fhem/graph/backend/gplot/GPlotParser.kt | 5 ----- .../klass/fhem/update/backend/DeviceListUpdateService.kt | 2 -- .../backend/device/configuration/DeviceDescMapping.kt | 2 -- .../fhem/update/backend/device/configuration/Sanitiser.kt | 7 +++---- 7 files changed, 4 insertions(+), 22 deletions(-) diff --git a/app/build-includes/android.gradle b/app/build-includes/android.gradle index 357124132..cde84e047 100644 --- a/app/build-includes/android.gradle +++ b/app/build-includes/android.gradle @@ -82,7 +82,6 @@ android { } debug { - ext.enableCrashlytics = false ext.alwaysUpdateBuildId = false //shrinkResources true //minifyEnabled true diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6385e82f1..338ad442b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -51,7 +51,6 @@ buildscript { version = "2.5.3" ) classpath(group = "com.google.firebase", name = "perf-plugin", version = "1.4.2") - classpath(group = "com.google.firebase", name = "firebase-crashlytics-gradle", version = "3.0.1") } } @@ -163,9 +162,6 @@ dependencies { exclude(group = "glide-parent") } - implementation(platform("com.google.firebase:firebase-bom:32.8.0")) - implementation("com.google.firebase:firebase-crashlytics") - implementation(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk7", version = kotlinVersion) implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version = "1.6.3") implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version = coroutinesVersion) @@ -202,5 +198,4 @@ apply(from = "build-includes/android.gradle") apply(from = "build-includes/unmock.gradle") apply(from = "build-includes/postTasks.gradle") apply(plugin = "com.google.gms.google-services") -apply(plugin = "com.google.firebase.firebase-perf") -apply(plugin = "com.google.firebase.crashlytics") \ No newline at end of file +apply(plugin = "com.google.firebase.firebase-perf") \ No newline at end of file diff --git a/app/src/main/java/li/klass/fhem/appwidget/update/AppWidgetInstanceManager.kt b/app/src/main/java/li/klass/fhem/appwidget/update/AppWidgetInstanceManager.kt index fe0ca5f30..081b41671 100644 --- a/app/src/main/java/li/klass/fhem/appwidget/update/AppWidgetInstanceManager.kt +++ b/app/src/main/java/li/klass/fhem/appwidget/update/AppWidgetInstanceManager.kt @@ -28,7 +28,6 @@ import android.app.Application import android.appwidget.AppWidgetManager import android.content.Context import android.content.SharedPreferences -import com.google.firebase.crashlytics.FirebaseCrashlytics import li.klass.fhem.appwidget.ui.widget.WidgetTypeProvider import li.klass.fhem.util.preferences.SharedPreferencesService import org.slf4j.LoggerFactory @@ -64,7 +63,6 @@ class AppWidgetInstanceManager @Inject constructor( val content = widgetView.createView(applicationContext, configuration) appWidgetManager.updateAppWidget(widgetId, content) } catch (e: Exception) { - FirebaseCrashlytics.getInstance().recordException(e) LOG.error("updateWidgetAfterDeviceListReload() - something strange happened during appwidget update", e) } } diff --git a/app/src/main/java/li/klass/fhem/graph/backend/gplot/GPlotParser.kt b/app/src/main/java/li/klass/fhem/graph/backend/gplot/GPlotParser.kt index c2160f34b..c760326eb 100644 --- a/app/src/main/java/li/klass/fhem/graph/backend/gplot/GPlotParser.kt +++ b/app/src/main/java/li/klass/fhem/graph/backend/gplot/GPlotParser.kt @@ -23,7 +23,6 @@ */ package li.klass.fhem.graph.backend.gplot -import com.google.firebase.crashlytics.FirebaseCrashlytics import li.klass.fhem.graph.backend.gplot.GPlotSeries.* import org.slf4j.LoggerFactory import java.io.IOException @@ -41,10 +40,6 @@ class GPlotParser @Inject constructor() { parse(content) } catch (e: Exception) { LOGGER.warn("parseSafe() - cannot parse: \r\n$content", e) - FirebaseCrashlytics.getInstance().apply { - setCustomKey("content", content) - recordException(e) - } null } } diff --git a/app/src/main/java/li/klass/fhem/update/backend/DeviceListUpdateService.kt b/app/src/main/java/li/klass/fhem/update/backend/DeviceListUpdateService.kt index 0e54d4557..cc8a0428c 100644 --- a/app/src/main/java/li/klass/fhem/update/backend/DeviceListUpdateService.kt +++ b/app/src/main/java/li/klass/fhem/update/backend/DeviceListUpdateService.kt @@ -27,7 +27,6 @@ package li.klass.fhem.update.backend import android.app.Application import android.content.Context import android.content.Intent -import com.google.firebase.crashlytics.FirebaseCrashlytics import li.klass.fhem.appindex.AppIndexIntentService import li.klass.fhem.connection.backend.ConnectionService import li.klass.fhem.connection.backend.DataConnectionSwitch @@ -143,7 +142,6 @@ class DeviceListUpdateService @Inject constructor( applicationContext.startService(Intent("com.google.firebase.appindexing.UPDATE_INDEX") .setClass(applicationContext, AppIndexIntentService::class.java)) } catch (e: Exception) { - FirebaseCrashlytics.getInstance().recordException(e) LOG.debug("cannot update app index, probably because we are in background", e) } } diff --git a/app/src/main/java/li/klass/fhem/update/backend/device/configuration/DeviceDescMapping.kt b/app/src/main/java/li/klass/fhem/update/backend/device/configuration/DeviceDescMapping.kt index 9ada94854..2c1b0d8cb 100644 --- a/app/src/main/java/li/klass/fhem/update/backend/device/configuration/DeviceDescMapping.kt +++ b/app/src/main/java/li/klass/fhem/update/backend/device/configuration/DeviceDescMapping.kt @@ -24,7 +24,6 @@ package li.klass.fhem.update.backend.device.configuration import android.content.Context -import com.google.firebase.crashlytics.FirebaseCrashlytics import li.klass.fhem.resources.ResourceIdMapper import org.json.JSONObject import javax.inject.Inject @@ -55,7 +54,6 @@ class DeviceDescMapping @Inject constructor() { mapping = JSONObject(DeviceDescMapping::class.java.getResource("/deviceDescMapping.json")?.readText(Charsets.UTF_8) ?: "") } catch (e: Exception) { - FirebaseCrashlytics.getInstance().recordException(e) throw RuntimeException(e) } } diff --git a/app/src/main/java/li/klass/fhem/update/backend/device/configuration/Sanitiser.kt b/app/src/main/java/li/klass/fhem/update/backend/device/configuration/Sanitiser.kt index 7b2c8d3e4..e381f1e72 100644 --- a/app/src/main/java/li/klass/fhem/update/backend/device/configuration/Sanitiser.kt +++ b/app/src/main/java/li/klass/fhem/update/backend/device/configuration/Sanitiser.kt @@ -24,13 +24,14 @@ package li.klass.fhem.update.backend.device.configuration -import com.google.firebase.crashlytics.FirebaseCrashlytics import li.klass.fhem.update.backend.device.configuration.sanitise.SanitiseConfiguration import li.klass.fhem.update.backend.device.configuration.sanitise.SanitiseGeneral import li.klass.fhem.update.backend.device.configuration.sanitise.SanitiseToAdd import li.klass.fhem.update.backend.device.configuration.sanitise.SanitiseValue import li.klass.fhem.update.backend.xmllist.DeviceNode -import li.klass.fhem.update.backend.xmllist.DeviceNode.DeviceNodeType.* +import li.klass.fhem.update.backend.xmllist.DeviceNode.DeviceNodeType.ATTR +import li.klass.fhem.update.backend.xmllist.DeviceNode.DeviceNodeType.INT +import li.klass.fhem.update.backend.xmllist.DeviceNode.DeviceNodeType.STATE import li.klass.fhem.update.backend.xmllist.XmlListDevice import li.klass.fhem.util.ValueDescriptionUtil import li.klass.fhem.util.ValueExtractUtil.extractLeadingDouble @@ -51,7 +52,6 @@ class Sanitiser @Inject constructor( val sanitiseConfiguration = sanitiseConfigurationFor(deviceType) ?: return deviceNode sanitise(deviceNode, sanitiseConfiguration) } catch (e: Exception) { - FirebaseCrashlytics.getInstance().recordException(e) LOGGER.error("cannot sanitise {}", deviceNode, e) deviceNode } @@ -64,7 +64,6 @@ class Sanitiser @Inject constructor( handleGeneral(xmlListDevice, generalOptions) } catch (e: JSONException) { - FirebaseCrashlytics.getInstance().recordException(e) throw RuntimeException(e) } }