From 987f776028d64781d54479dd9f15752f1c389b56 Mon Sep 17 00:00:00 2001 From: Juraj Hilje Date: Tue, 13 Aug 2024 12:33:37 +0200 Subject: [PATCH] feat: remove CrashLoggingController.kt --- .../java/net/ivpn/core/IVPNApplication.kt | 6 ---- .../common/logger/CrashLoggingController.kt | 35 ------------------ .../ivpn/core/common/utils/ComponentUtil.java | 1 - core/src/main/res/values/strings.xml | 2 -- .../net/ivpn/client/FDroidIVPNApplication.kt | 10 ------ .../logging/StubCrashLoggingController.kt | 36 ------------------- 6 files changed, 90 deletions(-) delete mode 100644 core/src/main/java/net/ivpn/core/common/logger/CrashLoggingController.kt delete mode 100644 fdroid/src/main/java/net/ivpn/client/logging/StubCrashLoggingController.kt diff --git a/core/src/main/java/net/ivpn/core/IVPNApplication.kt b/core/src/main/java/net/ivpn/core/IVPNApplication.kt index 21518c426..cd0e45e96 100644 --- a/core/src/main/java/net/ivpn/core/IVPNApplication.kt +++ b/core/src/main/java/net/ivpn/core/IVPNApplication.kt @@ -7,7 +7,6 @@ import androidx.navigation.NavGraph import net.ivpn.core.common.FeatureConfig import net.ivpn.core.common.dagger.ApplicationComponent import net.ivpn.core.common.dagger.DaggerApplicationComponent -import net.ivpn.core.common.logger.CrashLoggingController import net.ivpn.core.common.navigation.CustomNavigation import net.ivpn.core.v2.signup.SignUpController import net.ivpn.core.v2.updates.UpdatesController @@ -42,7 +41,6 @@ object IVPNApplication { lateinit var updatesController: UpdatesController lateinit var customNavigation: CustomNavigation lateinit var moduleNavGraph: NavGraph - lateinit var crashLoggingController: CrashLoggingController lateinit var config: FeatureConfig fun initBy(application: Application): ApplicationComponent{ @@ -67,10 +65,6 @@ object IVPNApplication { updatesController = controller } - fun applyCrashController(crashController: CrashLoggingController) { - this.crashLoggingController = crashController - } - fun applyFeatureConfig(config: FeatureConfig) { this.config = config } diff --git a/core/src/main/java/net/ivpn/core/common/logger/CrashLoggingController.kt b/core/src/main/java/net/ivpn/core/common/logger/CrashLoggingController.kt deleted file mode 100644 index 07bbb96ad..000000000 --- a/core/src/main/java/net/ivpn/core/common/logger/CrashLoggingController.kt +++ /dev/null @@ -1,35 +0,0 @@ -package net.ivpn.core.common.logger - -/* - IVPN Android app - https://github.com/ivpn/android-app - - Created by Oleksandr Mykhailenko. - Copyright (c) 2023 IVPN Limited. - - This file is part of the IVPN Android app. - - The IVPN Android app is free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) any later version. - - The IVPN Android app is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License - along with the IVPN Android app. If not, see . -*/ - -abstract class CrashLoggingController { - - var isEnabled: Boolean = false - var isSupported: Boolean = false - - abstract fun init() - - abstract fun setState(isEnabled: Boolean) - - abstract fun reset() -} \ No newline at end of file diff --git a/core/src/main/java/net/ivpn/core/common/utils/ComponentUtil.java b/core/src/main/java/net/ivpn/core/common/utils/ComponentUtil.java index 3585cf175..aa9b003d8 100644 --- a/core/src/main/java/net/ivpn/core/common/utils/ComponentUtil.java +++ b/core/src/main/java/net/ivpn/core/common/utils/ComponentUtil.java @@ -105,7 +105,6 @@ public void resetComponents() { protocolController.reset(); IVPNApplication.updatesController.resetComponent(); logUtil.resetAll(); - IVPNApplication.crashLoggingController.reset(); mockLocationController.reset(); NotificationManagerCompat.from(IVPNApplication.application).cancelAll(); diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 5ed3eb741..4acef3615 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -43,7 +43,6 @@ VERSION Color theme Enable logging - Enable crash logging Multi-hop connection Multi-hop same provider restriction Allow to use servers from the same provider to build Multi-hop chain. @@ -56,7 +55,6 @@ SEND LOGS Split tunneling We can\'t see these until you send them to us. - Anonymous crash logs will be sent to IVPN to help us improve the application. Choose which apps you want to use with IVPN. Allow using internet only when IVPN connection is enabled. Can help to improve protection. diff --git a/fdroid/src/main/java/net/ivpn/client/FDroidIVPNApplication.kt b/fdroid/src/main/java/net/ivpn/client/FDroidIVPNApplication.kt index d93dc8e66..176e38f60 100644 --- a/fdroid/src/main/java/net/ivpn/client/FDroidIVPNApplication.kt +++ b/fdroid/src/main/java/net/ivpn/client/FDroidIVPNApplication.kt @@ -25,7 +25,6 @@ package net.ivpn.client import androidx.multidex.MultiDexApplication import net.ivpn.client.dagger.DaggerFDroidComponent import net.ivpn.client.dagger.FDroidComponent -import net.ivpn.client.logging.StubCrashLoggingController import net.ivpn.client.navigation.FDroidNavigation import net.ivpn.client.signup.FDroidSignUpViewModel import net.ivpn.client.updates.StubUpdatesViewModel @@ -44,8 +43,6 @@ class FDroidIVPNApplication: MultiDexApplication() { @Inject lateinit var signup: FDroidSignUpViewModel - var crashController = StubCrashLoggingController() - var updates = StubUpdatesViewModel() override fun onCreate() { @@ -55,8 +52,6 @@ class FDroidIVPNApplication: MultiDexApplication() { initFeatureConfig() initComponents(appComponent) initUpdatesController() - //Init crash controller at first - initCrashLogging() IVPNApplication.initBaseComponents() initSignUpController() IVPNApplication.customNavigation = FDroidNavigation() @@ -78,9 +73,4 @@ class FDroidIVPNApplication: MultiDexApplication() { private fun initFeatureConfig() { IVPNApplication.applyFeatureConfig(FDroidFeatureConfig()) } - - private fun initCrashLogging() { - crashController.init() - IVPNApplication.crashLoggingController = crashController - } } \ No newline at end of file diff --git a/fdroid/src/main/java/net/ivpn/client/logging/StubCrashLoggingController.kt b/fdroid/src/main/java/net/ivpn/client/logging/StubCrashLoggingController.kt deleted file mode 100644 index 6de6f07be..000000000 --- a/fdroid/src/main/java/net/ivpn/client/logging/StubCrashLoggingController.kt +++ /dev/null @@ -1,36 +0,0 @@ -package net.ivpn.client.logging - -/* - IVPN Android app - https://github.com/ivpn/android-app - - Created by Oleksandr Mykhailenko. - Copyright (c) 2023 IVPN Limited. - - This file is part of the IVPN Android app. - - The IVPN Android app is free software: you can redistribute it and/or - modify it under the terms of the GNU General Public License as published by the Free - Software Foundation, either version 3 of the License, or (at your option) any later version. - - The IVPN Android app is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License - along with the IVPN Android app. If not, see . -*/ - -import net.ivpn.core.common.logger.CrashLoggingController - -class StubCrashLoggingController : CrashLoggingController() { - override fun init() { - } - - override fun setState(isEnabled: Boolean) { - } - - override fun reset() { - } -} \ No newline at end of file