[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.0-13.0-1] fixup! Disable features and functionality



Title: GitLab

richard pushed to branch firefox-android-115.2.0-13.0-1 at The Tor Project / Applications / firefox-android

Commits:

  • 2e2c4d37
    by Dan Ballard at 2023-08-11T15:25:56-07:00
    fixup! Disable features and functionality
    
    Bug 41997: Remove all use and reference to  com.adjust.sdk.Adjust which now uses AD_ID
    

3 changed files:

Changes:

  • fenix/app/build.gradle
    ... ... @@ -633,7 +633,6 @@ dependencies {
    633 633
         implementation FenixDependencies.protobuf_javalite
    
    634 634
         implementation FenixDependencies.google_material
    
    635 635
     
    
    636
    -    implementation FenixDependencies.adjust
    
    637 636
         implementation FenixDependencies.installreferrer // Required by Adjust
    
    638 637
     
    
    639 638
         // Required for in-app reviews
    

  • fenix/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt
    ... ... @@ -8,10 +8,6 @@ import android.app.Activity
    8 8
     import android.app.Application
    
    9 9
     import android.os.Bundle
    
    10 10
     import android.util.Log
    
    11
    -import com.adjust.sdk.Adjust
    
    12
    -import com.adjust.sdk.AdjustConfig
    
    13
    -import com.adjust.sdk.AdjustEvent
    
    14
    -import com.adjust.sdk.LogLevel
    
    15 11
     import kotlinx.coroutines.CoroutineDispatcher
    
    16 12
     import kotlinx.coroutines.CoroutineScope
    
    17 13
     import kotlinx.coroutines.Dispatchers
    
    ... ... @@ -31,76 +27,16 @@ class AdjustMetricsService(
    31 27
         override val type = MetricServiceType.Marketing
    
    32 28
     
    
    33 29
         override fun start() {
    
    34
    -        if ((BuildConfig.ADJUST_TOKEN.isNullOrBlank())) {
    
    35
    -            Log.i(LOGTAG, "No adjust token defined")
    
    36
    -
    
    37
    -            if (Config.channel.isReleased && !BuildConfig.DATA_COLLECTION_DISABLED) {
    
    38
    -                throw IllegalStateException("No adjust token defined for release build")
    
    39
    -            }
    
    40
    -
    
    41
    -            return
    
    42
    -        }
    
    43
    -
    
    44
    -        val config = AdjustConfig(
    
    45
    -            application,
    
    46
    -            BuildConfig.ADJUST_TOKEN,
    
    47
    -            AdjustConfig.ENVIRONMENT_PRODUCTION,
    
    48
    -            true,
    
    49
    -        )
    
    50
    -        config.setPreinstallTrackingEnabled(true)
    
    51
    -
    
    52
    -        val installationPing = FirstSessionPing(application)
    
    53
    -
    
    54
    -        val timerId = FirstSession.adjustAttributionTime.start()
    
    55
    -        config.setOnAttributionChangedListener {
    
    56
    -            FirstSession.adjustAttributionTime.stopAndAccumulate(timerId)
    
    57
    -            if (!it.network.isNullOrEmpty()) {
    
    58
    -                application.applicationContext.settings().adjustNetwork =
    
    59
    -                    it.network
    
    60
    -            }
    
    61
    -            if (!it.adgroup.isNullOrEmpty()) {
    
    62
    -                application.applicationContext.settings().adjustAdGroup =
    
    63
    -                    it.adgroup
    
    64
    -            }
    
    65
    -            if (!it.creative.isNullOrEmpty()) {
    
    66
    -                application.applicationContext.settings().adjustCreative =
    
    67
    -                    it.creative
    
    68
    -            }
    
    69
    -            if (!it.campaign.isNullOrEmpty()) {
    
    70
    -                application.applicationContext.settings().adjustCampaignId =
    
    71
    -                    it.campaign
    
    72
    -            }
    
    73
    -
    
    74
    -            installationPing.checkAndSend()
    
    75
    -        }
    
    76
    -
    
    77
    -        config.setLogLevel(LogLevel.SUPRESS)
    
    78
    -        Adjust.onCreate(config)
    
    79
    -        Adjust.setEnabled(true)
    
    80
    -        application.registerActivityLifecycleCallbacks(AdjustLifecycleCallbacks())
    
    30
    +        /* noop */
    
    81 31
         }
    
    82 32
     
    
    83 33
         override fun stop() {
    
    84
    -        Adjust.setEnabled(false)
    
    85
    -        Adjust.gdprForgetMe(application.applicationContext)
    
    34
    +        /* noop */
    
    86 35
         }
    
    87 36
     
    
    88 37
         @Suppress("TooGenericExceptionCaught")
    
    89 38
         override fun track(event: Event) {
    
    90
    -        CoroutineScope(dispatcher).launch {
    
    91
    -            try {
    
    92
    -                if (event is Event.GrowthData) {
    
    93
    -                    if (storage.shouldTrack(event)) {
    
    94
    -                        Adjust.trackEvent(AdjustEvent(event.tokenName))
    
    95
    -                        storage.updateSentState(event)
    
    96
    -                    } else {
    
    97
    -                        storage.updatePersistentState(event)
    
    98
    -                    }
    
    99
    -                }
    
    100
    -            } catch (e: Exception) {
    
    101
    -                crashReporter.submitCaughtException(e)
    
    102
    -            }
    
    103
    -        }
    
    39
    +        /* noop */
    
    104 40
         }
    
    105 41
     
    
    106 42
         override fun shouldTrack(event: Event): Boolean =
    
    ... ... @@ -112,11 +48,11 @@ class AdjustMetricsService(
    112 48
     
    
    113 49
         private class AdjustLifecycleCallbacks : Application.ActivityLifecycleCallbacks {
    
    114 50
             override fun onActivityResumed(activity: Activity) {
    
    115
    -            Adjust.onResume()
    
    51
    +            /* noop */
    
    116 52
             }
    
    117 53
     
    
    118 54
             override fun onActivityPaused(activity: Activity) {
    
    119
    -            Adjust.onPause()
    
    55
    +            /* noop */
    
    120 56
             }
    
    121 57
     
    
    122 58
             override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) { /* noop */ }
    

  • fenix/buildSrc/src/main/java/FenixDependencies.kt
    ... ... @@ -127,7 +127,6 @@ object FenixDependencies {
    127 127
         const val protobuf_javalite = "com.google.protobuf:protobuf-javalite:${FenixVersions.protobuf}"
    
    128 128
         const val protobuf_compiler = "com.google.protobuf:protoc:${FenixVersions.protobuf}"
    
    129 129
     
    
    130
    -    const val adjust = "com.adjust.sdk:adjust-android:${FenixVersions.adjust}"
    
    131 130
         const val installreferrer = "com.android.installreferrer:installreferrer:${FenixVersions.installreferrer}"
    
    132 131
     
    
    133 132
         const val junit = "junit:junit:${FenixVersions.junit}"
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits