aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-01-10 18:12:44 -0800
committerAllan Wang <me@allanwang.ca>2021-01-10 18:12:44 -0800
commit3ed1e1a96511a00517512addf6757517f3353c95 (patch)
tree0777f0c0bc9d59c151c3ed62745d93d493ba015c /app/src
parent69a6d5742b1c7ad43e174d7f28027185e084d451 (diff)
downloadfrost-3ed1e1a96511a00517512addf6757517f3353c95.tar.gz
frost-3ed1e1a96511a00517512addf6757517f3353c95.tar.bz2
frost-3ed1e1a96511a00517512addf6757517f3353c95.zip
Remove analytic content
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/intro/IntroMainFragments.kt37
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/prefs/OldPrefs.kt12
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/prefs/sections/CorePrefs.kt17
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/settings/Behaviour.kt3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt19
-rw-r--r--app/src/main/res/layout/intro_analytics.xml52
7 files changed, 0 insertions, 142 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