diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index bea7aae7de78..d5e580e44d98 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -26,15 +26,21 @@ import kotlinx.coroutines.launch import mozilla.appservices.Megazord import mozilla.components.browser.state.action.SystemAction import mozilla.components.browser.state.selector.selectedTab +import mozilla.components.browser.state.store.BrowserStore import mozilla.components.concept.base.crash.Breadcrumb import mozilla.components.concept.engine.webextension.WebExtension import mozilla.components.concept.engine.webextension.isUnsupported /* Gexsi begin: disable push import mozilla.components.concept.push.PushProcessor */ +import mozilla.components.concept.storage.FrecencyThresholdOption import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker import mozilla.components.feature.addons.update.GlobalAddonDependencyProvider +import mozilla.components.feature.autofill.AutofillUseCases +import mozilla.components.feature.search.ext.buildSearchUrl +import mozilla.components.feature.search.ext.waitForSelectedOrDefaultSearchEngine import mozilla.components.lib.crash.CrashReporter +import mozilla.components.service.fxa.manager.SyncEnginesStorage import mozilla.components.service.glean.Glean /* Gexsi begin: disable telemetry import mozilla.components.service.glean.config.Configuration @@ -50,13 +56,27 @@ import mozilla.components.support.rusthttp.RustHttpConfig import mozilla.components.support.rustlog.RustLog import mozilla.components.support.utils.logElapsedTime import mozilla.components.support.webextensions.WebExtensionSupport +import org.mozilla.experiments.nimbus.NimbusInterface +import org.mozilla.experiments.nimbus.internal.EnrolledExperiment +import org.mozilla.fenix.GleanMetrics.Addons +import org.mozilla.fenix.GleanMetrics.AndroidAutofill +import org.mozilla.fenix.GleanMetrics.CustomizeHome import org.mozilla.fenix.GleanMetrics.GleanBuildInfo import org.mozilla.fenix.GleanMetrics.Metrics import org.mozilla.fenix.GleanMetrics.PerfStartup +import org.mozilla.fenix.GleanMetrics.Preferences +import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine import org.mozilla.fenix.components.Components +import org.mozilla.fenix.components.Core +import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.components.metrics.MetricServiceType +import org.mozilla.fenix.components.metrics.MozillaProductDetector import org.mozilla.fenix.components.metrics.SecurePrefsTelemetry +import org.mozilla.fenix.components.toolbar.ToolbarPosition +import org.mozilla.fenix.ext.isCustomEngine +import org.mozilla.fenix.ext.isKnownSearchDomain import org.mozilla.fenix.ext.settings +import org.mozilla.fenix.perf.MarkersActivityLifecycleCallbacks import org.mozilla.fenix.perf.ProfilerMarkerFactProcessor import org.mozilla.fenix.perf.StartupTimeline import org.mozilla.fenix.perf.StorageStatsMetrics @@ -67,28 +87,8 @@ import org.mozilla.fenix.session.PerformanceActivityLifecycleCallbacks import org.mozilla.fenix.session.VisibilityLifecycleCallback import org.mozilla.fenix.telemetry.TelemetryLifecycleObserver import org.mozilla.fenix.utils.BrowsersCache -import java.util.concurrent.TimeUnit -import mozilla.components.browser.state.store.BrowserStore -import mozilla.components.concept.storage.FrecencyThresholdOption -import mozilla.components.feature.autofill.AutofillUseCases -import mozilla.components.feature.search.ext.buildSearchUrl -import mozilla.components.feature.search.ext.waitForSelectedOrDefaultSearchEngine -import mozilla.components.service.fxa.manager.SyncEnginesStorage -import org.mozilla.experiments.nimbus.NimbusInterface -import org.mozilla.experiments.nimbus.internal.EnrolledExperiment -import org.mozilla.fenix.GleanMetrics.Addons -import org.mozilla.fenix.GleanMetrics.AndroidAutofill -import org.mozilla.fenix.GleanMetrics.CustomizeHome -import org.mozilla.fenix.GleanMetrics.Preferences -import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine -import org.mozilla.fenix.components.Core -import org.mozilla.fenix.components.metrics.Event -import org.mozilla.fenix.components.metrics.MozillaProductDetector -import org.mozilla.fenix.components.toolbar.ToolbarPosition -import org.mozilla.fenix.ext.isCustomEngine -import org.mozilla.fenix.ext.isKnownSearchDomain -import org.mozilla.fenix.perf.MarkersActivityLifecycleCallbacks import org.mozilla.fenix.utils.Settings +import java.util.concurrent.TimeUnit /** *The main application class for Fenix. Records data to measure initialization performance. @@ -267,8 +267,9 @@ open class FenixApplication : LocaleAwareApplication(), Provider { // switches delay rendering top sites when the cache is empty, which // we can prevent with this. components.core.topSitesStorage.getTopSites( - components.settings.topSitesMaxLimit, - if (components.settings.showTopFrecentSites) + totalSites = components.settings.topSitesMaxLimit, + fetchProvidedTopSites = components.settings.showContileFeature, + frecencyConfig = if (components.settings.showTopFrecentSites) FrecencyThresholdOption.SKIP_ONE_TIME_PAGES else null diff --git a/app/src/main/java/org/mozilla/fenix/components/Core.kt b/app/src/main/java/org/mozilla/fenix/components/Core.kt index 0777be334773..ace43f448ccc 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Core.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -410,7 +410,7 @@ class Core( DefaultTopSitesStorage( pinnedSitesStorage = pinnedSiteStorage, historyStorage = historyStorage, - topSitesProvider = if (context.settings().showContileFeature) contileTopSitesProvider else null, + topSitesProvider = contileTopSitesProvider, defaultTopSites = defaultTopSites ) } diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt index 43995d86b3cf..3e7a691e2ba4 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt @@ -428,8 +428,9 @@ class HomeFragment : Fragment() { internal fun getTopSitesConfig(): TopSitesConfig { val settings = requireContext().settings() return TopSitesConfig( - settings.topSitesMaxLimit, - if (settings.showTopFrecentSites) FrecencyThresholdOption.SKIP_ONE_TIME_PAGES else null + totalSites = settings.topSitesMaxLimit, + fetchProvidedTopSites = settings.showContileFeature, + frecencyConfig = if (settings.showTopFrecentSites) FrecencyThresholdOption.SKIP_ONE_TIME_PAGES else null ) } diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 7405e10395f6..fa2fd646741b 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "98.0.20220125144533" + const val VERSION = "98.0.20220126003448" }