Merge remote-tracking branch 'origin/upstream-sync' into upstream-sync

pull/295/head
Adam Novak 3 years ago
commit 502269ad9f

@ -88,11 +88,16 @@ class PagedAddonCollectionProvider(
* @param readTimeoutInSeconds optional timeout in seconds to use when fetching * @param readTimeoutInSeconds optional timeout in seconds to use when fetching
* available add-ons from a remote endpoint. If not specified [DEFAULT_READ_TIMEOUT_IN_SECONDS] * available add-ons from a remote endpoint. If not specified [DEFAULT_READ_TIMEOUT_IN_SECONDS]
* will be used. * will be used.
* @param language optional language that will be ignored.
* @throws IOException if the request failed, or could not be executed due to cancellation, * @throws IOException if the request failed, or could not be executed due to cancellation,
* a connectivity problem or a timeout. * a connectivity problem or a timeout.
*/ */
@Throws(IOException::class) @Throws(IOException::class)
override suspend fun getAvailableAddons(allowCache: Boolean, readTimeoutInSeconds: Long?, language: String?): List<Addon> { override suspend fun getAvailableAddons(
allowCache: Boolean,
readTimeoutInSeconds: Long?,
language: String?
): List<Addon> {
val cachedAddons = if (allowCache && !cacheExpired(context)) { val cachedAddons = if (allowCache && !cacheExpired(context)) {
readFromDiskCache() readFromDiskCache()
} else { } else {

@ -56,6 +56,7 @@ private const val VIEW_HOLDER_TYPE_ADDON = 2
* @property addonsManagerDelegate Delegate that will provides method for handling the add-on items. * @property addonsManagerDelegate Delegate that will provides method for handling the add-on items.
* @param addons The list of add-on based on the AMO store. * @param addons The list of add-on based on the AMO store.
* @property style Indicates how items should look like. * @property style Indicates how items should look like.
* @property excludedAddonIDs A list of add-on IDs we could exclude. Currently ignored.
*/ */
@Suppress("TooManyFunctions", "LargeClass") @Suppress("TooManyFunctions", "LargeClass")
// We have an extra "Lint" Android Studio linter pass that Android Components // We have an extra "Lint" Android Studio linter pass that Android Components
@ -66,7 +67,8 @@ class PagedAddonsManagerAdapter(
private val addonCollectionProvider: PagedAddonCollectionProvider, private val addonCollectionProvider: PagedAddonCollectionProvider,
private val addonsManagerDelegate: AddonsManagerAdapterDelegate, private val addonsManagerDelegate: AddonsManagerAdapterDelegate,
addons: List<Addon>, addons: List<Addon>,
private val style: Style? = null private val style: Style? = null,
private val excludedAddonIDs: List<String> = emptyList()
) : ListAdapter<Any, CustomViewHolder>(DifferCallback) { ) : ListAdapter<Any, CustomViewHolder>(DifferCallback) {
private val scope = CoroutineScope(Dispatchers.IO) private val scope = CoroutineScope(Dispatchers.IO)
private val logger = Logger("PagedAddonsManagerAdapter") private val logger = Logger("PagedAddonsManagerAdapter")

@ -17,12 +17,12 @@ object FeatureFlags {
/** /**
* Enables the Nimbus experiments library. * Enables the Nimbus experiments library.
*/ */
val nimbusExperiments = false const val nimbusExperiments = false
/** /**
* Enables WebAuthn support. * Enables WebAuthn support.
*/ */
val webAuthFeature = true const val webAuthFeature = true
/** /**
* Shows new three-dot toolbar menu design. * Shows new three-dot toolbar menu design.

@ -24,7 +24,6 @@ import org.mozilla.fenix.components.metrics.AdjustMetricsService
import org.mozilla.fenix.components.metrics.GleanMetricsService import org.mozilla.fenix.components.metrics.GleanMetricsService
import org.mozilla.fenix.components.metrics.LeanplumMetricsService import org.mozilla.fenix.components.metrics.LeanplumMetricsService
import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.experiments.createNimbus
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.perf.lazyMonitored import org.mozilla.fenix.perf.lazyMonitored

Loading…
Cancel
Save