remove analytics dependencies completely
This commit is contained in:
parent
a68981d788
commit
adda661311
|
@ -5,7 +5,6 @@ apply plugin: 'kotlin-android'
|
|||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
//apply plugin: 'com.github.ben-manes.versions'
|
||||
|
||||
archivesBaseName = 'zcash-android-wallet'
|
||||
|
@ -143,10 +142,6 @@ dependencies {
|
|||
implementation Deps.Grpc.STUB
|
||||
implementation Deps.JavaX.JAVA_ANNOTATION
|
||||
|
||||
// Analytics (for dogfooding/crash-reporting/feedback only on internal team builds)
|
||||
implementation Deps.Analytics.CRASHLYTICS
|
||||
implementation Deps.Analytics.MIXPANEL
|
||||
|
||||
// Misc.
|
||||
implementation Deps.Misc.LOTTIE
|
||||
implementation Deps.Misc.CHIPS
|
||||
|
|
|
@ -33,17 +33,6 @@
|
|||
|
||||
<!-- Firebase options -->
|
||||
<meta-data android:name="com.google.firebase.ml.vision.DEPENDENCIES" android:value="barcode" />
|
||||
<!-- All reporting is opt-in, only -->
|
||||
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />
|
||||
|
||||
<!-- Mixpanel options -->
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.AutoShowMixpanelUpdates" android:value="false" />
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.EnableDebugLogging" android:value="false" />
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.DisableDecideChecker" android:value="true" />
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.DisableEmulatorBindingUI" android:value="true" />
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.DisableGestureBindingUI" android:value="true" />
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.DisableViewCrawler" android:value="true" />
|
||||
<meta-data android:name="com.mixpanel.android.MPConfig.IgnoreInvisibleViewsVisualEditor" android:value="true" />
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -9,7 +9,6 @@ import cash.z.ecc.android.feedback.*
|
|||
import cash.z.ecc.android.sdk.ext.SilentTwig
|
||||
import cash.z.ecc.android.sdk.ext.TroubleshootingTwig
|
||||
import cash.z.ecc.android.sdk.ext.Twig
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.multibindings.IntoSet
|
||||
|
@ -48,9 +47,8 @@ class AppModule {
|
|||
preferences: SharedPreferences,
|
||||
defaultObservers: Set<@JvmSuppressWildcards FeedbackCoordinator.FeedbackObserver>
|
||||
): FeedbackCoordinator {
|
||||
return preferences.getBoolean(FeedbackCoordinator.ENABLED, false).let { isEnabled ->
|
||||
return preferences.getBoolean(FeedbackCoordinator.ENABLED, true).let { isEnabled ->
|
||||
// observe nothing unless feedback is enabled
|
||||
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(isEnabled)
|
||||
Twig.plant(if (isEnabled) TroubleshootingTwig() else SilentTwig())
|
||||
FeedbackCoordinator(feedback, if (isEnabled) defaultObservers else setOf())
|
||||
}
|
||||
|
@ -70,14 +68,4 @@ class AppModule {
|
|||
@Singleton
|
||||
@IntoSet
|
||||
fun provideFeedbackConsole(): FeedbackCoordinator.FeedbackObserver = FeedbackConsole()
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@IntoSet
|
||||
fun provideFeedbackMixpanel(): FeedbackCoordinator.FeedbackObserver = FeedbackMixpanel()
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
@IntoSet
|
||||
fun provideFeedbackCrashlytics(): FeedbackCoordinator.FeedbackObserver = FeedbackCrashlytics()
|
||||
}
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
package cash.z.ecc.android.feedback
|
||||
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
|
||||
class FeedbackCrashlytics : FeedbackCoordinator.FeedbackObserver {
|
||||
/**
|
||||
* Report non-fatal crashes because fatal ones already get reported by default.
|
||||
*/
|
||||
override fun onAction(action: Feedback.Action) {
|
||||
var exception: Throwable? = null
|
||||
exception = when (action) {
|
||||
is Feedback.Crash -> action.exception
|
||||
is Feedback.NonFatal -> action.exception
|
||||
is Report.Error.NonFatal.Reorg -> ReorgException(
|
||||
action.errorHeight,
|
||||
action.rewindHeight,
|
||||
action.toString()
|
||||
)
|
||||
else -> null
|
||||
}
|
||||
exception?.let { FirebaseCrashlytics.getInstance().recordException(it) }
|
||||
}
|
||||
|
||||
private class ReorgException(errorHeight: Int, rewindHeight: Int, reorgMesssage: String) :
|
||||
Throwable(reorgMesssage)
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package cash.z.ecc.android.feedback
|
||||
|
||||
import cash.z.ecc.android.R
|
||||
import cash.z.ecc.android.ZcashWalletApp
|
||||
import cash.z.ecc.android.ext.toAppString
|
||||
import com.mixpanel.android.mpmetrics.MixpanelAPI
|
||||
|
||||
class FeedbackMixpanel : FeedbackCoordinator.FeedbackObserver {
|
||||
|
||||
private val mixpanel =
|
||||
MixpanelAPI.getInstance(ZcashWalletApp.instance, R.string.mixpanel_project.toAppString())
|
||||
|
||||
override fun onMetric(metric: Feedback.Metric) {
|
||||
track(metric.key, metric.toMap())
|
||||
}
|
||||
|
||||
override fun onAction(action: Feedback.Action) {
|
||||
track(action.key, action.toMap())
|
||||
}
|
||||
|
||||
override fun flush() {
|
||||
mixpanel.flush()
|
||||
}
|
||||
|
||||
private fun track(eventName: String, properties: Map<String, Any>) {
|
||||
mixpanel.trackMap(eventName, properties)
|
||||
}
|
||||
|
||||
}
|
|
@ -397,7 +397,7 @@ class MainActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
}
|
||||
twig("MainActivity has received an error${if (notified) " and notified the user" else ""} and reported it to crashlytics and mixpanel.")
|
||||
twig("MainActivity has received an error${if (notified) " and notified the user" else ""} and logged it.")
|
||||
feedback.report(error)
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ import cash.z.ecc.android.sdk.ext.twig
|
|||
import cash.z.ecc.android.ui.base.BaseFragment
|
||||
import cash.z.ecc.android.ui.send.SendViewModel
|
||||
import com.google.common.util.concurrent.ListenableFuture
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
<string name="app_name">ECC Wallet</string>
|
||||
<string name="receive_address_title">Your Shielded Address</string>
|
||||
|
||||
|
||||
<string name="mixpanel_project">a178e1ef062133fc121079cb12fa43c7</string>
|
||||
|
||||
<!-- Send Flow -->
|
||||
<string name="send_hint_input_zcash_address">Enter a shielded Zcash address</string>
|
||||
<string name="send_hint_input_zcash_amount">Enter an amount to send</string>
|
||||
|
|
|
@ -13,7 +13,6 @@ buildscript {
|
|||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${Deps.kotlinVersion}"
|
||||
classpath 'io.fabric.tools:gradle:1.31.2'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,10 +60,6 @@ object Deps {
|
|||
val PROTOBUG = "io.grpc:grpc-protobuf-lite:$version"
|
||||
val STUB = "io.grpc:grpc-stub:$version"
|
||||
}
|
||||
object Analytics { // for dogfooding/crash-reporting/feedback only on internal team builds
|
||||
val CRASHLYTICS = "com.google.firebase:firebase-crashlytics:17.0.1"
|
||||
val MIXPANEL = "com.mixpanel.android:mixpanel-android:5.6.3"
|
||||
}
|
||||
object JavaX {
|
||||
const val INJECT = "javax.inject:javax.inject:1"
|
||||
const val JAVA_ANNOTATION = "javax.annotation:javax.annotation-api:1.3.2"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
rootProject.name='Zcash Wallet'
|
||||
rootProject.name='Zircle'
|
||||
include ':app', ':qrecycler', ':feedback', ':mnemonic', ':lockbox'
|
Loading…
Reference in New Issue