Bug 1913841 - Remove metric service for Firefox Focus and Klar r=android-reviewers,amejiamarmol a=RyanVM
Differential Revision:
https://phabricator.services.mozilla.com/D219581
--- 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()