Skip to main content
Sign in
Snippets Groups Projects
Commit 6507104e authored by Matthew Finkel's avatar Matthew Finkel Committed by Pier Angelo Vendrame
Browse files

TB 40185: [android] Use NimbusDisabled

Originally, fenix#40185.
parent d82118fe
No related branches found
No related tags found
1 merge request!1503TB 43415, part 3: Shuffle commits
Showing
with 214 additions and 69 deletions
......@@ -96,32 +96,32 @@ open class NimbusMessagingController(
* creates a URI string for the message action.
*/
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
fun processMessageActionToUri(message: Message): Uri {
open fun processMessageActionToUri(message: Message): Uri {
val (uuid, action) = messagingStorage.generateUuidAndFormatMessage(message)
sendClickedMessageTelemetry(message.id, uuid)
return convertActionIntoDeepLinkSchemeUri(action)
}
private fun sendDismissedMessageTelemetry(messageId: String) {
open fun sendDismissedMessageTelemetry(messageId: String) {
GleanMessaging.messageDismissed.record(GleanMessaging.MessageDismissedExtra(messageId))
}
private fun sendShownMessageTelemetry(messageId: String) {
open fun sendShownMessageTelemetry(messageId: String) {
GleanMessaging.messageShown.record(GleanMessaging.MessageShownExtra(messageId))
}
private fun sendExpiredMessageTelemetry(messageId: String) {
open fun sendExpiredMessageTelemetry(messageId: String) {
GleanMessaging.messageExpired.record(GleanMessaging.MessageExpiredExtra(messageId))
}
private fun sendClickedMessageTelemetry(messageId: String, uuid: String?) {
open fun sendClickedMessageTelemetry(messageId: String, uuid: String?) {
GleanMessaging.messageClicked.record(
GleanMessaging.MessageClickedExtra(messageKey = messageId, actionUuid = uuid),
)
}
private fun sendMicrosurveyCompletedTelemetry(messageId: String, answer: String) {
open fun sendMicrosurveyCompletedTelemetry(messageId: String, answer: String) {
Microsurvey.submitButtonTapped.record(
Microsurvey.SubmitButtonTappedExtra(
surveyId = messageId,
......@@ -130,7 +130,7 @@ open class NimbusMessagingController(
)
}
private fun convertActionIntoDeepLinkSchemeUri(action: String): Uri =
open fun convertActionIntoDeepLinkSchemeUri(action: String): Uri =
if (action.startsWith("://")) {
"$deepLinkScheme$action".toUri()
} else {
......
......
......@@ -33,7 +33,7 @@ const val MESSAGING_FEATURE_ID = "messaging"
/**
* Provides messages from [messagingFeature] and combine with the metadata store on [metadataStorage].
*/
class NimbusMessagingStorage(
open class NimbusMessagingStorage(
private val context: Context,
private val metadataStorage: MessageMetadataStorage,
private val onMalformedMessage: (String) -> Unit = {
......
......
......@@ -220,7 +220,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
)
// Set the metric configuration from Nimbus.
Glean.applyServerKnobsConfig(FxNimbus.features.glean.value().metricsEnabled.toString())
// Glean.applyServerKnobsConfig(FxNimbus.features.glean.value().metricsEnabled.toString())
Glean.initialize(
applicationContext = this,
......@@ -252,7 +252,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
//
// We can initialize Nimbus before Glean because Glean will queue messages
// before it's initialized.
initializeNimbus()
// initializeNimbus()
ProfilerMarkerFactProcessor.create { components.core.engine.profiler }.register()
......
......
......@@ -121,7 +121,6 @@ import org.mozilla.fenix.ext.getIntentSource
import org.mozilla.fenix.ext.getNavDirections
import org.mozilla.fenix.ext.hasTopDestination
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.recordEventInNimbus
import org.mozilla.fenix.ext.setNavigationIcon
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.ext.systemGesturesInsets
......@@ -373,7 +372,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
} else {
lifecycleScope.launch(IO) {
showFullscreenMessageIfNeeded(applicationContext)
// showFullscreenMessageIfNeeded(applicationContext)
}
// Unless the activity is recreated, navigate to home first (without rendering it)
......@@ -414,7 +413,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
),
)
// This will record an event in Nimbus' internal event store. Used for behavioral targeting
recordEventInNimbus("app_opened")
// recordEventInNimbus("app_opened")
if (safeIntent.action.equals(ACTION_OPEN_PRIVATE_TAB) && source == APP_ICON) {
AppIcon.newPrivateTabTapped.record(NoExtras())
......@@ -1385,10 +1384,12 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
keyDismissButtonText = null,
)
/*
researchSurfaceDialogFragment.onAccept = {
processIntent(messaging.getIntentForMessage(nextMessage))
components.appStore.dispatch(AppAction.MessagingAction.MessageClicked(nextMessage))
}
*/
researchSurfaceDialogFragment.onDismiss = {
components.appStore.dispatch(AppAction.MessagingAction.MessageDismissed(nextMessage))
......@@ -1401,10 +1402,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
)
}
// Update message as displayed.
val currentBootUniqueIdentifier = BootUtils.getBootIdentifier(context)
messaging.onMessageDisplayed(nextMessage, currentBootUniqueIdentifier)
// // Update message as displayed.
// val currentBootUniqueIdentifier = BootUtils.getBootIdentifier(context)
//
// messaging.onMessageDisplayed(nextMessage, currentBootUniqueIdentifier)
}
@VisibleForTesting
......
......
......@@ -727,7 +727,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
override fun navToQuickSettingsSheet(tab: SessionState, sitePermissions: SitePermissions?) {
val useCase = requireComponents.useCases.trackingProtectionUseCases
FxNimbus.features.cookieBanners.recordExposure()
// FxNimbus.features.cookieBanners.recordExposure()
useCase.containsException(tab.id) { hasTrackingProtectionException ->
lifecycleScope.launch {
val cookieBannersStorage = requireComponents.core.cookieBannersStorage
......
......
......@@ -49,7 +49,6 @@ import org.mozilla.fenix.GleanMetrics.SyncAuth
import org.mozilla.fenix.R
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.maxActiveTime
import org.mozilla.fenix.ext.recordEventInNimbus
import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.perf.StrictModeManager
import org.mozilla.fenix.perf.lazyMonitored
......@@ -267,7 +266,7 @@ internal class TelemetryAccountObserver(
// User signed-in into an existing FxA account.
AuthType.Signin -> {
SyncAuth.signIn.record(NoExtras())
context.recordEventInNimbus("sync_auth.sign_in")
// context.recordEventInNimbus("sync_auth.sign_in")
}
// User created a new FxA account.
......
......
......@@ -5,17 +5,28 @@
package org.mozilla.fenix.components
import android.content.Context
import android.content.Intent
import android.net.Uri
import mozilla.components.service.nimbus.NimbusApi
import mozilla.components.service.nimbus.NimbusDisabled
import mozilla.components.service.nimbus.messaging.FxNimbusMessaging
import mozilla.components.service.nimbus.messaging.Message
import mozilla.components.service.nimbus.messaging.Message.Metadata
import mozilla.components.service.nimbus.messaging.MessageData
import mozilla.components.service.nimbus.messaging.MessageMetadataStorage
import mozilla.components.service.nimbus.messaging.MessageSurfaceId
import mozilla.components.service.nimbus.messaging.NimbusMessagingController
import mozilla.components.service.nimbus.messaging.NimbusMessagingControllerInterface
import mozilla.components.service.nimbus.messaging.NimbusMessagingStorage
import mozilla.components.service.nimbus.messaging.OnDiskMessageMetadataStorage
import mozilla.components.service.nimbus.messaging.StyleData
import org.mozilla.experiments.nimbus.NimbusEventStore
import org.mozilla.experiments.nimbus.NimbusMessagingHelperInterface
import org.mozilla.experiments.nimbus.NullNimbus
import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.experiments.createNimbus
import org.mozilla.fenix.messaging.CustomAttributeProvider
import org.mozilla.fenix.nimbus.FxNimbus
import org.mozilla.fenix.perf.lazyMonitored
/**
......@@ -28,7 +39,14 @@ class NimbusComponents(private val context: Context) {
* should be mediated through a FML generated class, e.g. [FxNimbus].
*/
val sdk: NimbusApi by lazyMonitored {
createNimbus(context, BuildConfig.NIMBUS_ENDPOINT)
if (BuildConfig.DATA_COLLECTION_DISABLED) {
NimbusDisabled(context)
} else {
createNimbus(context, BuildConfig.NIMBUS_ENDPOINT).also { api ->
FxNimbus.api = api
}
}
}
/**
......@@ -44,7 +62,8 @@ class NimbusComponents(private val context: Context) {
* the JEXL helper available from [createJexlHelper].
*/
val events: NimbusEventStore by lazyMonitored {
sdk.events
NullNimbus(context)
//sdk.events
}
/**
......@@ -78,7 +97,7 @@ class NimbusComponents(private val context: Context) {
* from the Nimbus Messaging component.
*/
val messaging: NimbusMessagingControllerInterface by lazyMonitored {
NimbusMessagingController(
NullNimbusMessagingController(
messagingStorage = messagingStorage,
deepLinkScheme = BuildConfig.DEEP_LINK_SCHEME,
)
......@@ -92,10 +111,132 @@ class NimbusComponents(private val context: Context) {
private val messagingStorage by lazyMonitored {
NimbusMessagingStorage(
context = context,
metadataStorage = OnDiskMessageMetadataStorage(context),
metadataStorage = NullMessageMetadataStorage(), //OnDiskMessageMetadataStorage(context),
nimbus = sdk,
messagingFeature = FxNimbusMessaging.features.messaging,
attributeProvider = CustomAttributeProvider,
)
}
}
// Noop impl of MessageMetadataStorage to replace OnDiskMessageMetadataStorage
class NullMessageMetadataStorage(): MessageMetadataStorage {
override suspend fun getMetadata(): Map<String, Message.Metadata> {
var metadataMap: MutableMap<String, Message.Metadata> = hashMapOf()
return metadataMap
}
override suspend fun addMetadata(metadata: Message.Metadata): Message.Metadata {
return metadata
}
override suspend fun updateMetadata(metadata: Message.Metadata) {
// noop
}
}
class NullNimbusMessagingController(
messagingStorage: NimbusMessagingStorage,
deepLinkScheme: String,
) : NimbusMessagingController(messagingStorage, deepLinkScheme) {
private val nullMessage: Message = Message(
id = "",
data = MessageData(),
action = "",
style = StyleData(),
triggerIfAll = listOf(),
excludeIfAny = listOf(),
metadata = Metadata(""),
)
override suspend fun onMessageDisplayed(displayedMessage: Message, bootIdentifier: String?): Message {
return nullMessage
}
/**
* Called when a message has been dismissed by the user.
*
* Records a messageDismissed event, and records that the message
* has been dismissed.
*/
override suspend fun onMessageDismissed(message: Message) {
return
}
/**
* Called when a microsurvey attached to a message has been completed by the user.
*
* @param message The message containing the microsurvey that was completed.
* @param answer The user's response to the microsurvey question.
*/
override suspend fun onMicrosurveyCompleted(message: Message, answer: String) {
return
}
/**
* Called once the user has clicked on a message.
*
* This records that the message has been clicked on, but does not record a
* glean event. That should be done via [processMessageActionToUri].
*/
override suspend fun onMessageClicked(message: Message) {
return
}
/**
* Create and return the relevant [Intent] for the given [Message].
*
* @param message the [Message] to create the [Intent] for.
* @return an [Intent] using the processed [Message].
*/
override fun getIntentForMessage(message: Message) = Intent()
/**
* Will attempt to get the [Message] for the given [id].
*
* @param id the [Message.id] of the [Message] to try to match.
* @return the [Message] with a matching [id], or null if no [Message] has a matching [id].
*/
override suspend fun getMessage(id: String): Message? {
return nullMessage
}
/**
* The [message] action needs to be examined for string substitutions
* and any `uuid` needs to be recorded in the Glean event.
*
* We call this `process` as it has a side effect of logging a Glean event while it
* creates a URI string for the message action.
*/
override fun processMessageActionToUri(message: Message): Uri {
return Uri.EMPTY
}
override fun sendDismissedMessageTelemetry(messageId: String) {
return
}
override fun sendShownMessageTelemetry(messageId: String) {
return
}
override fun sendExpiredMessageTelemetry(messageId: String) {
return
}
override fun sendClickedMessageTelemetry(messageId: String, uuid: String?) {
return
}
override fun sendMicrosurveyCompletedTelemetry(messageId: String, answer: String) {
return
}
override fun convertActionIntoDeepLinkSchemeUri(action: String): Uri = Uri.EMPTY
override suspend fun getMessages(): List<Message> = listOf()
override suspend fun getNextMessage(surfaceId: MessageSurfaceId) = nullMessage
override fun getNextMessage(surfaceId: MessageSurfaceId, messages: List<Message>) = nullMessage
}
......@@ -534,7 +534,7 @@ class HomeFragment : Fragment() {
disableAppBarDragging()
FxNimbus.features.homescreen.recordExposure()
// FxNimbus.features.homescreen.recordExposure()
// DO NOT MOVE ANYTHING BELOW THIS addMarker CALL!
requireComponents.core.engine.profiler?.addMarker(
......
......
......@@ -33,7 +33,7 @@ class FenixOnboarding(context: Context) : PreferencesHolder {
// - We would like to evaluate the configuration only once (and thus it's kept in memory
// and not re-evaluated)
val config by lazy {
FxNimbus.features.onboarding.recordExposure()
// FxNimbus.features.onboarding.recordExposure()
FxNimbus.features.onboarding.value()
}
......
......
......@@ -45,7 +45,7 @@ class ReEngagementNotificationWorker(
// Recording the exposure event here to capture all users who met all criteria to receive
// the re-engagement notification
FxNimbus.features.reEngagementNotification.recordExposure()
// FxNimbus.features.reEngagementNotification.recordExposure()
if (!settings.reEngagementNotificationEnabled) {
return Result.success()
......
......
......@@ -197,11 +197,14 @@ class SettingsFragment : PreferenceFragmentCompat() {
override fun onResume() {
super.onResume()
// Use nimbus to set the title, and a trivial addition
val nimbusValidation = FxNimbus.features.nimbusValidation.value()
// IN TOR BROWSER: We don't talk about Nimbus!
// ~Use nimbus to set the title, and a trivial addition~
// val nimbusValidation = FxNimbus.features.nimbusValidation.value()
val title = nimbusValidation.settingsTitle
val suffix = nimbusValidation.settingsPunctuation
// val title = nimbusValidation.settingsTitle
// val suffix = nimbusValidation.settingsPunctuation
val title = getString(R.string.settings_title)
val suffix = ""
showToolbar("$title$suffix")
......@@ -730,7 +733,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
@VisibleForTesting
internal fun setupCookieBannerPreference() {
FxNimbus.features.cookieBanners.recordExposure()
// FxNimbus.features.cookieBanners.recordExposure()
if (context?.settings()?.shouldShowCookieBannerUI == false) return
with(requirePreference<SwitchPreference>(R.string.pref_key_cookie_banner_private_mode)) {
isVisible = context.settings().shouldShowCookieBannerUI
......
......
......@@ -39,7 +39,7 @@ class DefaultLocaleSettingsController(
LocaleManager.updateBaseConfiguration(activity, locale)
// Invalidate cached values to use the new locale
FxNimbus.features.nimbusValidation.withCachedValue(null)
// FxNimbus.features.nimbusValidation.withCachedValue(null)
activity.recreate()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
activity.overrideActivityTransition(Activity.OVERRIDE_TRANSITION_OPEN, 0, 0)
......@@ -59,7 +59,7 @@ class DefaultLocaleSettingsController(
LocaleManager.updateBaseConfiguration(activity, localeSettingsStore.state.localeList[0])
// Invalidate cached values to use the default locale
FxNimbus.features.nimbusValidation.withCachedValue(null)
// FxNimbus.features.nimbusValidation.withCachedValue(null)
activity.recreate()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
activity.overrideActivityTransition(Activity.OVERRIDE_TRANSITION_OPEN, 0, 0)
......
......
......@@ -22,7 +22,6 @@ import org.mozilla.fenix.R
import org.mozilla.fenix.browser.StandardSnackbarError
import org.mozilla.fenix.components.appstate.AppAction
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.recordEventInNimbus
import org.mozilla.geckoview.GeckoSession
import org.mozilla.geckoview.GeckoSession.GeckoPrintException.ERROR_NO_ACTIVITY_CONTEXT
import org.mozilla.geckoview.GeckoSession.GeckoPrintException.ERROR_NO_ACTIVITY_CONTEXT_DELEGATE
......@@ -153,7 +152,7 @@ class SaveToPDFMiddleware(
source = telemetrySource(isPdf),
),
)
context.recordEventInNimbus("print_tapped")
// context.recordEventInNimbus("print_tapped")
} else {
Events.saveToPdfTapped.record(
Events.SaveToPdfTappedExtra(
......
......
......@@ -148,7 +148,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showTopSitesFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_show_top_sites),
featureFlag = true,
default = { homescreenSections[HomeScreenSection.TOP_SITES] == true },
default = { true }
)
var numberOfAppLaunches by intPreference(
......@@ -288,7 +288,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showWallpaperOnboarding by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding),
featureFlag = true,
default = { mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true },
default = { true /* mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true */ },
)
var openLinksInAPrivateTab by booleanPreference(
......@@ -663,25 +663,25 @@ class Settings(private val appContext: Context) : PreferencesHolder {
get() = false // cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1
val shouldEnableCookieBannerDetectOnly: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_DETECT_ONLY] == 1
get() = false // cookieBannersSection[CookieBannersSection.FEATURE_SETTING_DETECT_ONLY] == 1
val shouldEnableCookieBannerGlobalRules: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES] == 1
get() = false // cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES] == 1
val shouldEnableCookieBannerGlobalRulesSubFrame: Boolean
get() = cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES_SUB_FRAMES] == 1
get() = false // cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES_SUB_FRAMES] == 1
val shouldEnableQueryParameterStripping: Boolean
get() = queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING] == "1"
get() = true // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING] == "1"
val shouldEnableQueryParameterStrippingPrivateBrowsing: Boolean
get() = queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_PMB] == "1"
get() = true // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_PMB] == "1"
val queryParameterStrippingAllowList: String
get() = queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_ALLOW_LIST].orEmpty()
get() = "" // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_ALLOW_LIST].orEmpty()
val queryParameterStrippingStripList: String
get() = queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_STRIP_LIST].orEmpty()
get() = "" // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_STRIP_LIST].orEmpty()
/**
* Declared as a function for performance purposes. This could be declared as a variable using
......@@ -731,7 +731,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var reEngagementNotificationEnabled by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_re_engagement_notification_enabled),
default = { FxNimbus.features.reEngagementNotification.value().enabled },
default = { false },
featureFlag = true,
)
......@@ -739,8 +739,8 @@ class Settings(private val appContext: Context) : PreferencesHolder {
* Indicates if the re-engagement notification feature is enabled
*/
val reEngagementNotificationType: Int
get() =
FxNimbus.features.reEngagementNotification.value().type
get() = 0 // Neither Type A or B
// FxNimbus.features.reEngagementNotification.value().type
val shouldUseAutoBatteryTheme by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme),
......@@ -1536,25 +1536,27 @@ class Settings(private val appContext: Context) : PreferencesHolder {
).contains(langTag)
}
private val mr2022Sections: Map<Mr2022Section, Boolean>
get() =
FxNimbus.features.mr2022.value().sectionsEnabled
// private val mr2022Sections: Map<Mr2022Section, Boolean>
// get() =
// FxNimbus.features.mr2022.value().sectionsEnabled
private val cookieBannersSection: Map<CookieBannersSection, Int>
get() =
FxNimbus.features.cookieBanners.value().sectionsEnabled
// private val cookieBannersSection: Map<CookieBannersSection, Int>
// get() =
// FxNimbus.features.cookieBanners.value().sectionsEnabled
private val queryParameterStrippingSection: Map<QueryParameterStrippingSection, String>
get() =
FxNimbus.features.queryParameterStripping.value().sectionsEnabled
// private val queryParameterStrippingSection: Map<QueryParameterStrippingSection, String>
// get() =
// FxNimbus.features.queryParameterStripping.value().sectionsEnabled
private val homescreenSections: Map<HomeScreenSection, Boolean>
get() =
FxNimbus.features.homescreen.value().sectionsEnabled
// private val homescreenSections: Map<HomeScreenSection, Boolean>
// get() =
// FxNimbus.features.homescreen.value().sectionsEnabled
// IN TOR BROWSER: we want to avoid ever calling Nimbus, so we hard-code defaults
// for everything that would have accessed this property.
var historyMetadataUIFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_history_metadata_feature),
default = { homescreenSections[HomeScreenSection.RECENT_EXPLORATIONS] == true },
default = { true },
featureFlag = true,
)
......@@ -1564,7 +1566,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showSyncCFR by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_sync_cfr),
featureFlag = true,
default = { mr2022Sections[Mr2022Section.SYNC_CFR] == true },
default = { false /* mr2022Sections[Mr2022Section.SYNC_CFR] == true */ },
)
/**
......@@ -1573,7 +1575,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showHomeOnboardingDialog by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_home_onboarding_dialog),
featureFlag = true,
default = { mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true },
default = { true /* mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true */ },
)
/**
......@@ -1582,7 +1584,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showRecentTabsFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_recent_tabs),
featureFlag = true,
default = { homescreenSections[HomeScreenSection.JUMP_BACK_IN] == true },
default = { true },
)
/**
......@@ -1590,7 +1592,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var showBookmarksHomeFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_customization_bookmarks),
default = { homescreenSections[HomeScreenSection.BOOKMARKS] == true },
default = { true },
featureFlag = true,
)
......@@ -1627,7 +1629,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
var showPocketRecommendationsFeature by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_pocket_homescreen_recommendations),
featureFlag = FeatureFlags.isPocketRecommendationsFeatureEnabled(appContext),
default = { homescreenSections[HomeScreenSection.POCKET] == true },
default = { false },
)
/**
......@@ -1635,7 +1637,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
val showPocketSponsoredStories by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_pocket_sponsored_stories),
default = { homescreenSections[HomeScreenSection.POCKET_SPONSORED_STORIES] == true },
default = { false },
featureFlag = FeatureFlags.isPocketSponsoredStoriesFeatureEnabled(appContext),
)
......@@ -1718,8 +1720,8 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
fun shouldShowOnboarding(hasUserBeenOnboarded: Boolean, isLauncherIntent: Boolean): Boolean {
return if (!hasUserBeenOnboarded && isLauncherIntent) {
FxNimbus.features.junoOnboarding.recordExposure()
true
// FxNimbus.features.junoOnboarding.recordExposure()
false
} else {
false
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment