
Dan Ballard pushed to branch tor-browser-140.0a1-15.0-1 at The Tor Project / Applications / Tor Browser Commits: 4d19dc54 by Beatriz Rizental at 2025-06-17T14:39:17-07:00 fixup! TB 42669: [android] Use custom no-op app-services - - - - - 7d929101 by Beatriz Rizental at 2025-06-17T14:39:17-07:00 Revert "TB 40185: [android] Use NimbusDisabled" This reverts commit c98c78c527f11856aab9f7e16ff503f267e665e2. - - - - - 0235f26b by Beatriz Rizental at 2025-06-17T14:39:17-07:00 [android] Override settings - - - - - d5bc2018 by Beatriz Rizental at 2025-06-17T14:39:17-07:00 fixup! [android] Override settings Disable the tab-strip experiment for all channels. Having this experiment enabled overrides the toolbar position to always be on the top, which we don't want. - - - - - 19 changed files: - mobile/android/android-components/components/browser/storage-sync/src/main/java/mozilla/components/browser/storage/sync/RemoteTabsStorage.kt - mobile/android/android-components/components/concept/sync/src/main/java/mozilla/components/concept/sync/AccountEvent.kt - mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FxaDeviceConstellation.kt - mobile/android/android-components/components/service/nimbus/src/main/java/mozilla/components/service/nimbus/messaging/NimbusMessagingController.kt - mobile/android/android-components/components/service/nimbus/src/main/java/mozilla/components/service/nimbus/messaging/NimbusMessagingStorage.kt - mobile/android/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt - mobile/android/fenix/app/nimbus.fml.yaml - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/NimbusComponents.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/FenixOnboarding.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/ReEngagementNotificationWorker.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/share/SaveToPDFMiddleware.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt Changes: ===================================== mobile/android/android-components/components/browser/storage-sync/src/main/java/mozilla/components/browser/storage/sync/RemoteTabsStorage.kt ===================================== @@ -161,6 +161,7 @@ class RemoteTabsCommandQueue( .groupBy { when (it.command) { is RemoteCommand.CloseTab -> PendingCommandGroup.Key.CloseTab(it.deviceId) + is RemoteCommand.__NOOP -> PendingCommandGroup.Key.Noop(it.deviceId) // Add `is ... ->` branches for future pending commands here... }.asAnyKey } @@ -184,6 +185,13 @@ class RemoteTabsCommandQueue( pendingCommands = pendingCommands, ) } + is PendingCommandGroup.Key.Noop -> { + PendingCommandGroup( + deviceId = key.deviceId, + command = DeviceCommandOutgoing.Noop(), + pendingCommands = pendingCommands, + ) + } // Add `is ... ->` branches for future pending command grouping keys here... }.asAnyGroup } @@ -279,6 +287,7 @@ class RemoteTabsCommandQueue( sealed interface Key { data class CloseTab(val deviceId: String) : Key + data class Noop(val deviceId: String) : Key // Add data classes for future pending command grouping keys here... /** Returns this grouping key as a type-erased [Key]. */ ===================================== mobile/android/android-components/components/concept/sync/src/main/java/mozilla/components/concept/sync/AccountEvent.kt ===================================== @@ -55,6 +55,9 @@ sealed class DeviceCommandIncoming { * Outgoing device commands (ie, targeted at other devices.) */ sealed class DeviceCommandOutgoing { + /** A command to do nothing */ + class Noop() : DeviceCommandOutgoing() + /** A command to open a tab on another device */ class SendTab(val title: String, val url: String) : DeviceCommandOutgoing() ===================================== mobile/android/android-components/components/service/firefox-accounts/src/main/java/mozilla/components/service/fxa/FxaDeviceConstellation.kt ===================================== @@ -195,8 +195,10 @@ class FxaDeviceConstellation( is RustCloseTabsResult.Ok -> Result.success(true) is RustCloseTabsResult.TabsNotClosed -> Result.failure(SendCommandException.TabsNotClosed(closeTabsResult.urls)) + is RustCloseTabsResult.__NOOP -> Result.success(false) } } + is DeviceCommandOutgoing.Noop -> Result.success(false) } val errors: List<Throwable> = SyncTelemetry.processFxaTelemetry(account.gatherTelemetry()) for (error in errors) { ===================================== mobile/android/android-components/components/service/nimbus/src/main/java/mozilla/components/service/nimbus/messaging/NimbusMessagingController.kt ===================================== @@ -96,32 +96,32 @@ open class NimbusMessagingController( * creates a URI string for the message action. */ @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) - open fun processMessageActionToUri(message: Message): Uri { + fun processMessageActionToUri(message: Message): Uri { val (uuid, action) = messagingStorage.generateUuidAndFormatMessage(message) sendClickedMessageTelemetry(message.id, uuid) return convertActionIntoDeepLinkSchemeUri(action) } - open fun sendDismissedMessageTelemetry(messageId: String) { + private fun sendDismissedMessageTelemetry(messageId: String) { GleanMessaging.messageDismissed.record(GleanMessaging.MessageDismissedExtra(messageId)) } - open fun sendShownMessageTelemetry(messageId: String) { + private fun sendShownMessageTelemetry(messageId: String) { GleanMessaging.messageShown.record(GleanMessaging.MessageShownExtra(messageId)) } - open fun sendExpiredMessageTelemetry(messageId: String) { + private fun sendExpiredMessageTelemetry(messageId: String) { GleanMessaging.messageExpired.record(GleanMessaging.MessageExpiredExtra(messageId)) } - open fun sendClickedMessageTelemetry(messageId: String, uuid: String?) { + private fun sendClickedMessageTelemetry(messageId: String, uuid: String?) { GleanMessaging.messageClicked.record( GleanMessaging.MessageClickedExtra(messageKey = messageId, actionUuid = uuid), ) } - open fun sendMicrosurveyCompletedTelemetry(messageId: String, answer: String) { + private fun sendMicrosurveyCompletedTelemetry(messageId: String, answer: String) { Microsurvey.submitButtonTapped.record( Microsurvey.SubmitButtonTappedExtra( surveyId = messageId, @@ -130,7 +130,7 @@ open class NimbusMessagingController( ) } - open fun convertActionIntoDeepLinkSchemeUri(action: String): Uri = + private fun convertActionIntoDeepLinkSchemeUri(action: String): Uri = if (action.startsWith("://")) { "$deepLinkScheme$action".toUri() } else { ===================================== mobile/android/android-components/components/service/nimbus/src/main/java/mozilla/components/service/nimbus/messaging/NimbusMessagingStorage.kt ===================================== @@ -33,7 +33,7 @@ const val MESSAGING_FEATURE_ID = "messaging" /** * Provides messages from [messagingFeature] and combine with the metadata store on [metadataStorage]. */ -open class NimbusMessagingStorage( +class NimbusMessagingStorage( private val context: Context, private val metadataStorage: MessageMetadataStorage, private val onMalformedMessage: (String) -> Unit = { ===================================== mobile/android/android-components/plugins/dependencies/src/main/java/ApplicationServices.kt ===================================== @@ -3,8 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // These lines are generated by android-components/automation/application-services-nightly-bump.py -val VERSION = "140.20250523140405" -val CHANNEL = ApplicationServicesChannel.NIGHTLY +val VERSION = "140.0-TORBROWSER" +val CHANNEL = ApplicationServicesChannel.RELEASE object ApplicationServicesConfig { val version = VERSION ===================================== mobile/android/fenix/app/nimbus.fml.yaml ===================================== @@ -642,13 +642,13 @@ features: defaults: - channel: developer value: - enabled: true + enabled: false - channel: nightly value: - enabled: true + enabled: false - channel: beta value: - enabled: true + enabled: false trending-searches: description: Enables trending searches. ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt ===================================== @@ -212,7 +212,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() ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt ===================================== @@ -124,6 +124,7 @@ import org.mozilla.fenix.ext.getNavDirections import org.mozilla.fenix.ext.hasTopDestination import org.mozilla.fenix.ext.nav import org.mozilla.fenix.ext.openSetDefaultBrowserOption +import org.mozilla.fenix.ext.recordEventInNimbus import org.mozilla.fenix.ext.setNavigationIcon import org.mozilla.fenix.ext.settings import org.mozilla.fenix.extension.WebExtensionPromptFeature @@ -458,7 +459,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorAn if (!shouldShowOnboarding) { lifecycleScope.launch(IO) { - // showFullscreenMessageIfNeeded(applicationContext) + showFullscreenMessageIfNeeded(applicationContext) } // Unless the activity is recreated, navigate to home first (without rendering it) @@ -498,7 +499,7 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorAn ), ) // 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()) @@ -1549,12 +1550,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorAn keyDismissButtonText = null, ) - /* researchSurfaceDialogFragment.onAccept = { processIntent(messaging.getIntentForMessage(nextMessage)) components.appStore.dispatch(AppAction.MessagingAction.MessageClicked(nextMessage)) } - */ researchSurfaceDialogFragment.onDismiss = { components.appStore.dispatch(AppAction.MessagingAction.MessageDismissed(nextMessage)) @@ -1567,10 +1566,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorAn ) } -// // 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) } private fun showCrashReporter() { ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt ===================================== @@ -598,7 +598,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 ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt ===================================== @@ -49,6 +49,7 @@ 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 @@ -266,7 +267,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. ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/NimbusComponents.kt ===================================== @@ -5,28 +5,17 @@ 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 /** @@ -39,14 +28,7 @@ class NimbusComponents(private val context: Context) { * should be mediated through a FML generated class, e.g. [FxNimbus]. */ val sdk: NimbusApi by lazyMonitored { - if (BuildConfig.DATA_COLLECTION_DISABLED) { - NimbusDisabled(context) - } else { - createNimbus(context, BuildConfig.NIMBUS_ENDPOINT).also { api -> - FxNimbus.api = api - } - } - + createNimbus(context, BuildConfig.NIMBUS_ENDPOINT) } /** @@ -62,8 +44,7 @@ class NimbusComponents(private val context: Context) { * the JEXL helper available from [createJexlHelper]. */ val events: NimbusEventStore by lazyMonitored { - NullNimbus(context) - //sdk.events + sdk.events } /** @@ -97,7 +78,7 @@ class NimbusComponents(private val context: Context) { * from the Nimbus Messaging component. */ val messaging: NimbusMessagingControllerInterface by lazyMonitored { - NullNimbusMessagingController( + NimbusMessagingController( messagingStorage = messagingStorage, deepLinkScheme = BuildConfig.DEEP_LINK_SCHEME, ) @@ -111,132 +92,10 @@ class NimbusComponents(private val context: Context) { private val messagingStorage by lazyMonitored { NimbusMessagingStorage( context = context, - metadataStorage = NullMessageMetadataStorage(), //OnDiskMessageMetadataStorage(context), + metadataStorage = 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 -} ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt ===================================== @@ -581,7 +581,7 @@ class HomeFragment : Fragment(), UserInteractionHandler { disableAppBarDragging() - // FxNimbus.features.homescreen.recordExposure() + FxNimbus.features.homescreen.recordExposure() // DO NOT MOVE ANYTHING BELOW THIS addMarker CALL! requireComponents.core.engine.profiler?.addMarker( ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/FenixOnboarding.kt ===================================== @@ -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() } ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/ReEngagementNotificationWorker.kt ===================================== @@ -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() ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt ===================================== @@ -216,14 +216,11 @@ class SettingsFragment : PreferenceFragmentCompat(), UserInteractionHandler { override fun onResume() { super.onResume() - // 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() + // 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 = getString(R.string.settings_title) - val suffix = "" + val title = nimbusValidation.settingsTitle + val suffix = nimbusValidation.settingsPunctuation showToolbar("$title$suffix") @@ -819,7 +816,7 @@ class SettingsFragment : PreferenceFragmentCompat(), UserInteractionHandler { @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 ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/advanced/DefaultLocaleSettingsController.kt ===================================== @@ -40,7 +40,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) @@ -60,7 +60,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) ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/share/SaveToPDFMiddleware.kt ===================================== @@ -22,6 +22,7 @@ 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 @@ -152,7 +153,7 @@ class SaveToPDFMiddleware( source = telemetrySource(isPdf), ), ) - // context.recordEventInNimbus("print_tapped") + context.recordEventInNimbus("print_tapped") } else { Events.saveToPdfTapped.record( Events.SaveToPdfTappedExtra( ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt ===================================== @@ -320,7 +320,7 @@ class Settings(private val appContext: Context) : PreferencesHolder { var showWallpaperOnboarding by lazyFeatureFlagPreference( key = appContext.getPreferenceKey(R.string.pref_key_wallpapers_onboarding), featureFlag = true, - default = { true /* mr2022Sections[Mr2022Section.WALLPAPERS_SELECTION_TOOL] == true */ }, + default = { true }, ) var openLinksInAPrivateTab by booleanPreference( @@ -820,25 +820,25 @@ class Settings(private val appContext: Context) : PreferencesHolder { get() = false // cookieBannersSection[CookieBannersSection.FEATURE_UI] == 1 val shouldEnableCookieBannerDetectOnly: Boolean - get() = false // cookieBannersSection[CookieBannersSection.FEATURE_SETTING_DETECT_ONLY] == 1 + get() = false val shouldEnableCookieBannerGlobalRules: Boolean - get() = false // cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES] == 1 + get() = false val shouldEnableCookieBannerGlobalRulesSubFrame: Boolean - get() = false // cookieBannersSection[CookieBannersSection.FEATURE_SETTING_GLOBAL_RULES_SUB_FRAMES] == 1 + get() = false val shouldEnableQueryParameterStripping: Boolean - get() = true // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING] == "1" + get() = true val shouldEnableQueryParameterStrippingPrivateBrowsing: Boolean - get() = true // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_PMB] == "1" + get() = true val queryParameterStrippingAllowList: String - get() = "" // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_ALLOW_LIST].orEmpty() + get() = "" val queryParameterStrippingStripList: String - get() = "" // queryParameterStrippingSection[QUERY_PARAMETER_STRIPPING_STRIP_LIST].orEmpty() + get() = "" /** * Declared as a function for performance purposes. This could be declared as a variable using @@ -896,8 +896,7 @@ class Settings(private val appContext: Context) : PreferencesHolder { * Indicates if the re-engagement notification feature is enabled */ val reEngagementNotificationType: Int - get() = 0 // Neither Type A or B - // FxNimbus.features.reEngagementNotification.value().type + get() = 0 val shouldUseAutoBatteryTheme by booleanPreference( appContext.getPreferenceKey(R.string.pref_key_auto_battery_theme), @@ -1709,24 +1708,22 @@ class Settings(private val appContext: Context) : PreferencesHolder { return currentlyEnabledLanguages.contains(userLangTag) } -// 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 = { true }, @@ -1739,7 +1736,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 = { false /* mr2022Sections[Mr2022Section.SYNC_CFR] == true */ }, + default = { false }, ) /** @@ -1748,7 +1745,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 = { true /* mr2022Sections[Mr2022Section.HOME_ONBOARDING_DIALOG_EXISTING_USERS] == true */ }, + default = { true }, ) /** @@ -1917,7 +1914,6 @@ class Settings(private val appContext: Context) : PreferencesHolder { isLauncherIntent: Boolean, ): Boolean { return if (featureEnabled && !hasUserBeenOnboarded && isLauncherIntent) { - // FxNimbus.features.junoOnboarding.recordExposure() false } else { false View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/37eb9b8... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/37eb9b8... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
Dan Ballard (@dan)