Bug 1913841 - Remove metric service for Firefox Focus and Klar r=android-reviewers,amejiamarmol a=RyanVM
authorZac McKenney <zmckenney@mozilla.com>
Wed, 21 Aug 2024 23:06:34 +0000 (11 months ago)
changeset 825755 4063905c6215c2ca9b7d9d11bd8c822f38a858a8
parent 825754 ac10dac000c9c348ed3ca533bc8bd37ca04bf9d9
child 825756 c2ef9b6fb3ae9dc32b6d2f767acda719be328ad0
push id20051
push userryanvm@gmail.com
push dateThu, 22 Aug 2024 22:59:06 +0000 (10 months ago)
treeherdermozilla-beta@c2ef9b6fb3ae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersandroid-reviewers, amejiamarmol, RyanVM
bugs1913841
milestone130.0
Bug 1913841 - Remove metric service for Firefox Focus and Klar r=android-reviewers,amejiamarmol a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D219581
mobile/android/focus-android/app/src/debug/java/org/mozilla/focus/utils/AdjustHelper.java
mobile/android/focus-android/app/src/focusBeta/java/org/mozilla/focus/utils/AdjustHelper.java
mobile/android/focus-android/app/src/focusRelease/java/org/mozilla/focus/utils/AdjustHelper.java
mobile/android/focus-android/app/src/klarBeta/java/org/mozilla/focus/utils/AdjustHelper.java
mobile/android/focus-android/app/src/klarRelease/java/org/mozilla/focus/utils/AdjustHelper.java
mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt
--- a/mobile/android/focus-android/app/src/debug/java/org/mozilla/focus/utils/AdjustHelper.java
+++ b/mobile/android/focus-android/app/src/debug/java/org/mozilla/focus/utils/AdjustHelper.java
@@ -2,13 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.focus.utils;
 
 import android.content.Context;
 
+/** @deprecated  Adjust is disabled on Focus. */
+@Deprecated
 public class AdjustHelper {
+
+    @Deprecated
     public static void setupAdjustIfNeeded(Context context) {
         // DEBUG: No Adjust - This class has different implementations for all build types.
     }
 }
--- a/mobile/android/focus-android/app/src/focusBeta/java/org/mozilla/focus/utils/AdjustHelper.java
+++ b/mobile/android/focus-android/app/src/focusBeta/java/org/mozilla/focus/utils/AdjustHelper.java
@@ -2,13 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.focus.utils;
 
 import android.content.Context;
 
+/** @deprecated  Adjust is disabled on Focus. */
+@Deprecated
 public class AdjustHelper {
+
+    @Deprecated
     public static void setupAdjustIfNeeded(Context context) {
         // DEBUG: No Adjust - This class has different implementations for all build types.
     }
 }
--- a/mobile/android/focus-android/app/src/focusRelease/java/org/mozilla/focus/utils/AdjustHelper.java
+++ b/mobile/android/focus-android/app/src/focusRelease/java/org/mozilla/focus/utils/AdjustHelper.java
@@ -13,17 +13,21 @@ import android.text.TextUtils;
 import com.adjust.sdk.Adjust;
 import com.adjust.sdk.AdjustConfig;
 import com.adjust.sdk.LogLevel;
 
 import org.mozilla.focus.BuildConfig;
 import org.mozilla.focus.FocusApplication;
 import org.mozilla.focus.telemetry.GleanMetricsService;
 
+/** @deprecated  Adjust is disabled on Focus. */
+@Deprecated
 public class AdjustHelper {
+
+    @Deprecated
     public static void setupAdjustIfNeeded(FocusApplication application) {
         // RELEASE: Enable Adjust - This class has different implementations for all build types.
 
         //noinspection ConstantConditions
         if (TextUtils.isEmpty(BuildConfig.ADJUST_TOKEN)) {
             throw new IllegalStateException("No adjust token defined for release build");
         }
 
--- a/mobile/android/focus-android/app/src/klarBeta/java/org/mozilla/focus/utils/AdjustHelper.java
+++ b/mobile/android/focus-android/app/src/klarBeta/java/org/mozilla/focus/utils/AdjustHelper.java
@@ -2,13 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.focus.utils;
 
 import android.content.Context;
 
+/** @deprecated  Adjust is disabled on Klar. */
+@Deprecated
 public class AdjustHelper {
+
+    @Deprecated
     public static void setupAdjustIfNeeded(Context context) {
         // DEBUG: No Adjust - This class has different implementations for all build types.
     }
 }
--- a/mobile/android/focus-android/app/src/klarRelease/java/org/mozilla/focus/utils/AdjustHelper.java
+++ b/mobile/android/focus-android/app/src/klarRelease/java/org/mozilla/focus/utils/AdjustHelper.java
@@ -2,13 +2,17 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.focus.utils;
 
 import android.content.Context;
 
+/** @deprecated  Adjust is disabled on Klar. */
+@Deprecated
 public class AdjustHelper {
+
+    @Deprecated
     public static void setupAdjustIfNeeded(Context context) {
         // DEBUG: No Adjust - This class has different implementations for all build types.
     }
 }
--- a/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt
+++ b/mobile/android/focus-android/app/src/main/java/org/mozilla/focus/FocusApplication.kt
@@ -32,17 +32,16 @@ import mozilla.components.support.webext
 import org.mozilla.focus.biometrics.LockObserver
 import org.mozilla.focus.experiments.finishNimbusInitialization
 import org.mozilla.focus.ext.settings
 import org.mozilla.focus.navigation.StoreLink
 import org.mozilla.focus.nimbus.FocusNimbus
 import org.mozilla.focus.session.VisibilityLifeCycleCallback
 import org.mozilla.focus.telemetry.FactsProcessor
 import org.mozilla.focus.telemetry.ProfilerMarkerFactProcessor
-import org.mozilla.focus.utils.AdjustHelper
 import org.mozilla.focus.utils.AppConstants
 import kotlin.coroutines.CoroutineContext
 
 @Suppress("TooManyFunctions")
 open class FocusApplication : LocaleAwareApplication(), Provider, CoroutineScope {
     private var job = Job()
     override val coroutineContext: CoroutineContext
         get() = job + Dispatchers.Main
@@ -73,18 +72,16 @@ open class FocusApplication : LocaleAwar
             initializeTelemetry()
 
             finishSetupMegazord()
 
             ProfilerMarkerFactProcessor.create { components.engine.profiler }.register()
 
             enableStrictMode()
 
-            AdjustHelper.setupAdjustIfNeeded(this@FocusApplication)
-
             visibilityLifeCycleCallback = VisibilityLifeCycleCallback(this@FocusApplication)
             registerActivityLifecycleCallbacks(visibilityLifeCycleCallback)
             registerComponentCallbacks(visibilityLifeCycleCallback)
 
             storeLink.start()
 
             initializeWebExtensionSupport()