Remove all mentions of analytics

The analytics build configuration has not been used or updated for a while. This removes some dependencies, and some deprecated code sections.
This commit is contained in:
Inhishonor
2025-06-13 10:21:16 -07:00
parent 0eeb643e6f
commit f3b178e182
27 changed files with 49 additions and 681 deletions
@@ -20,11 +20,10 @@ package dev.octoshrimpy.quik.experiment
import android.content.Context
import android.preference.PreferenceManager
import dev.octoshrimpy.quik.manager.AnalyticsManager
import java.util.Locale
import java.util.Random
abstract class Experiment<T>(val context: Context, val analytics: AnalyticsManager) {
abstract class Experiment<T>(val context: Context) {
private val prefs by lazy { PreferenceManager.getDefaultSharedPreferences(context) }
private val prefKey: String
@@ -49,7 +48,6 @@ abstract class Experiment<T>(val context: Context, val analytics: AnalyticsManag
else -> { // Variant hasn't been set yet
variants[Random().nextInt(variants.size)].also { variant ->
analytics.setUserProperty("Experiment: $key", variant.key)
prefs.edit().putString(prefKey, variant.key).apply()
}.value
}
@@ -1,27 +0,0 @@
/*
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
*
* This file is part of QKSMS.
*
* QKSMS 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.
*
* QKSMS 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 QKSMS. If not, see <http://www.gnu.org/licenses/>.
*/
package dev.octoshrimpy.quik.manager
interface AnalyticsManager {
fun track(event: String, vararg properties: Pair<String, Any>)
fun setUserProperty(key: String, value: Any)
}