diff options
8 files changed, 0 insertions, 143 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt index efb9956c..337c9678 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt @@ -41,7 +41,6 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.databinding.ActivityIntroBinding import com.pitchedapps.frost.intro.BaseIntroFragment import com.pitchedapps.frost.intro.IntroAccountFragment -import com.pitchedapps.frost.intro.IntroFragmentAnalytics import com.pitchedapps.frost.intro.IntroFragmentEnd import com.pitchedapps.frost.intro.IntroFragmentTheme import com.pitchedapps.frost.intro.IntroFragmentWelcome @@ -76,7 +75,6 @@ class IntroActivity : KauBaseActivity(), ViewPager.PageTransformer, IntroAccountFragment(), IntroTabTouchFragment(), IntroTabContextFragment(), - IntroFragmentAnalytics(), IntroFragmentEnd() ) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt index 3bf98678..d160bee4 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt @@ -30,12 +30,9 @@ import androidx.fragment.app.Fragment import ca.allanwang.kau.kotlin.LazyResettableRegistry import ca.allanwang.kau.utils.Kotterknife import ca.allanwang.kau.utils.bindViewResettable -import ca.allanwang.kau.utils.setIcon import ca.allanwang.kau.utils.setOnSingleTapListener -import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.IntroActivity -import com.pitchedapps.frost.databinding.IntroAnalyticsBinding import com.pitchedapps.frost.prefs.Prefs import kotlin.math.abs import org.koin.android.ext.android.inject @@ -141,40 +138,6 @@ class IntroFragmentWelcome : BaseIntroFragment(R.layout.intro_welcome) { } } -class IntroFragmentAnalytics : BaseIntroFragment(R.layout.intro_analytics) { - - val container: ConstraintLayout by bindViewResettable(R.id.intro_analytics_container) - - private lateinit var binding: IntroAnalyticsBinding - - override fun viewArray(): Array<Array<out View>> = with(binding) { - arrayOf( - arrayOf(title), arrayOf(image), - arrayOf(introSwitch), arrayOf(desc) - ) - } - - override fun themeFragmentImpl() { - super.themeFragmentImpl() - image.imageTintList = ColorStateList.valueOf(prefs.textColor) - } - - @SuppressLint("ClickableViewAccessibility") - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - binding = IntroAnalyticsBinding.bind(view) - binding.init() - } - - private fun IntroAnalyticsBinding.init() { - image.setIcon(GoogleMaterial.Icon.gmd_bug_report, 120) - introSwitch.isSelected = prefs.analytics - introSwitch.setOnCheckedChangeListener { _, isChecked -> - prefs.analytics = isChecked - } - } -} - class IntroFragmentEnd : BaseIntroFragment(R.layout.intro_end) { val container: ConstraintLayout by bindViewResettable(R.id.intro_end_container) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/OldPrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/OldPrefs.kt index 954c7f9a..1abed8fb 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/OldPrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/OldPrefs.kt @@ -111,18 +111,6 @@ class OldPrefs(factory: KPrefFactory) : KPref("${BuildConfig.APPLICATION_ID}.pre */ var verboseLogging: Boolean by kpref("verbose_logging", false) - var analytics: Boolean by kpref("analytics", false) { -// if (!BuildConfig.DEBUG) { -// if (it) { -// Bugsnag.setAutoCaptureSessions(true) -// Bugsnag.enableExceptionHandler() -// } else { -// Bugsnag.setAutoCaptureSessions(false) -// Bugsnag.disableExceptionHandler() -// } -// } - } - var biometricsEnabled: Boolean by kpref("biometrics_enabled", false) var overlayEnabled: Boolean by kpref("overlay_enabled", true) diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt index b7041f75..6d3885cb 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt @@ -47,11 +47,6 @@ interface CorePrefs : PrefsBase { */ var verboseLogging: Boolean - /** - * True to enable analytic reports (BugSnag) - */ - var analytics: Boolean - var enablePip: Boolean var exitConfirmation: Boolean @@ -93,18 +88,6 @@ class CorePrefsImpl( oldPrefs.verboseLogging /* false */ ) - override var analytics: Boolean by kpref("analytics", oldPrefs.analytics /* false */) { -// if (!BuildConfig.DEBUG) { -// if (it) { -// Bugsnag.setAutoCaptureSessions(true) -// Bugsnag.enableExceptionHandler() -// } else { -// Bugsnag.setAutoCaptureSessions(false) -// Bugsnag.disableExceptionHandler() -// } -// } - } - override var enablePip: Boolean by kpref("enable_pip", oldPrefs.enablePip /* true */) override var exitConfirmation: Boolean by kpref( diff --git a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt index 45a3e5c0..5cc989d6 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt @@ -88,7 +88,4 @@ fun SettingsActivity.getBehaviourPrefs(): KPrefAdapterBuilder.() -> Unit = { descRes = R.string.exit_confirmation_desc } - checkbox(R.string.analytics, prefs::analytics, { prefs.analytics = it }) { - descRes = R.string.analytics_desc - } } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt index 67d2f55a..e455aace 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt @@ -51,25 +51,6 @@ object L : KauLogger("Frost") { } } - var hasAnalytics: () -> Boolean = { false } - - override fun logImpl(priority: Int, message: String?, t: Throwable?) { - /* - * Debug flag is constant and should help with optimization - * bugsnagInit is changed per application and helps prevent crashes (if calling pre init) - * analytics is changed by the user, and may be toggled throughout the app - */ - if (BuildConfig.DEBUG || !hasAnalytics()) { - super.logImpl(priority, message, t) - } else { -// if (message != null) { -// Bugsnag.leaveBreadcrumb(message) -// } -// if (t != null) { -// Bugsnag.notify(t) -// } - } - } } fun KauLoggerExtension.test(message: () -> Any?) { diff --git a/app/src/main/res/layout/intro_analytics.xml b/app/src/main/res/layout/intro_analytics.xml deleted file mode 100644 index 3a44e0bb..00000000 --- a/app/src/main/res/layout/intro_analytics.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - xmlns:tools="http://schemas.android.com/tools" - android:id="@+id/intro_analytics_container" - android:layout_width="match_parent" - android:layout_height="match_parent"> - - <TextView - android:id="@id/intro_title" - style="@style/IntroTitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/analytics" - app:layout_constraintBottom_toTopOf="@id/intro_image" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_chainStyle="spread" /> - - <ImageView - android:id="@id/intro_image" - android:layout_width="120dp" - android:layout_height="120dp" - android:scaleType="fitCenter" - app:layout_constraintBottom_toTopOf="@id/intro_switch" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/intro_title" - tools:layout_editor_absoluteX="112dp" /> - - <androidx.appcompat.widget.SwitchCompat - android:id="@+id/intro_switch" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - app:layout_constraintBottom_toTopOf="@id/intro_desc" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/intro_image" /> - - <TextView - android:id="@id/intro_desc" - style="@style/IntroSubTitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/analytics_desc" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/intro_switch" /> - -</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file diff --git a/build.gradle b/build.gradle index 8811522b..0a7aae8a 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,6 @@ buildscript { dependencies { classpath kau.Plugins.android classpath kau.Plugins.kotlin - classpath kau.Plugins.bugsnag classpath kau.Plugins.spotless classpath kau.Plugins.dexCount classpath kau.Plugins.gitVersion |