Skip to content

Commit

Permalink
Merge branch 'master' into rvm_sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 30, 2023
2 parents 3cf5f2e + 8ee9b08 commit d3941e7
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class AddonsFragment : Fragment(), AddonsManagerAdapterDelegate {

scope.launch(Dispatchers.Main) {
val adapter = AddonsManagerAdapter(
requireContext().components.core.addonCollectionProvider,
requireContext().components.core.addonProvider,
this@AddonsFragment,
addons,
)
Expand Down Expand Up @@ -125,7 +125,7 @@ class AddonsFragment : Fragment(), AddonsManagerAdapterDelegate {

val dialog = AddonInstallationDialogFragment.newInstance(
addon = addon,
addonCollectionProvider = requireContext().components.core.addonCollectionProvider,
addonsProvider = requireContext().components.core.addonProvider,
onConfirmButtonClicked = { _, allowInPrivateBrowsing ->
if (allowInPrivateBrowsing) {
requireContext().components.core.addonManager.setAddonAllowedInPrivateBrowsing(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import mozilla.components.concept.engine.Engine
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy
import mozilla.components.concept.fetch.Client
import mozilla.components.feature.addons.AddonManager
import mozilla.components.feature.addons.amo.AddonCollectionProvider
import mozilla.components.feature.addons.amo.AMOAddonsProvider
import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
import mozilla.components.feature.addons.update.DefaultAddonUpdater
import mozilla.components.feature.customtabs.store.CustomTabsServiceStore
Expand Down Expand Up @@ -181,7 +181,7 @@ class Core(private val context: Context) {

// Addons
val addonManager by lazy {
AddonManager(store, engine, addonCollectionProvider, addonUpdater)
AddonManager(store, engine, addonProvider, addonUpdater)
}

val addonUpdater by lazy {
Expand All @@ -192,11 +192,11 @@ class Core(private val context: Context) {
)
}

val addonCollectionProvider by lazy {
val addonProvider by lazy {
if (Settings.isAmoCollectionOverrideConfigured(context)) {
provideCustomAddonCollectionProvider()
provideCustomAddonProvider()
} else {
provideDefaultAddonCollectionProvider()
provideDefaultAddonProvider()
}
}

Expand All @@ -208,17 +208,17 @@ class Core(private val context: Context) {
)
}

private fun provideDefaultAddonCollectionProvider(): AddonCollectionProvider {
return AddonCollectionProvider(
private fun provideDefaultAddonProvider(): AMOAddonsProvider {
return AMOAddonsProvider(
context = context,
client = client,
collectionName = "7dfae8669acc4312a65e8ba5553036",
maxCacheAgeInMinutes = DAY_IN_MINUTES,
)
}

private fun provideCustomAddonCollectionProvider(): AddonCollectionProvider {
return AddonCollectionProvider(
private fun provideCustomAddonProvider(): AMOAddonsProvider {
return AMOAddonsProvider(
context,
client,
collectionUser = Settings.getOverrideAmoUser(context),
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/AndroidComponents.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

object AndroidComponents {
const val VERSION = "118.0.20230809040122"
const val VERSION = "119.0.20230830040308"
}
8 changes: 4 additions & 4 deletions buildSrc/src/main/java/Config.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* 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/. */

import org.gradle.api.Project
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale

/* 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/. */

object Config {
// Synchronized build configuration for all modules
const val compileSdkVersion = 33
Expand Down
6 changes: 3 additions & 3 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// Synchronized version numbers for dependencies used by (some) modules
object Versions {
object AndroidX {
const val activity_compose = "1.7.1"
const val activity_compose = "1.7.2"
const val appcompat = "1.6.1"
const val compose = "1.4.3"
const val constraintlayout = "2.1.4"
const val core = "1.10.0"
const val core = "1.10.1"
const val lifecycle = "2.6.1"
const val preference = "1.2.0"
const val swiperefreshlayout = "1.1.0"
Expand Down Expand Up @@ -41,7 +41,7 @@ object Versions {
const val androidx_orchestrator = "1.4.2"
const val androidx_runner = "1.5.2"
const val androidx_uiautomator = "2.2.0"
const val detekt = "1.23.0"
const val detekt = "1.23.1"
const val jacoco = "0.8.10"
const val ktlint = "0.50.0"
const val mockwebserver = "4.11.0"
Expand Down
4 changes: 1 addition & 3 deletions config/detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ output-reports:
comments:
active: true
AbsentOrWrongFileLicense:
active: false
active: true # Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1795140
licenseTemplateFile: 'license.template'
licenseTemplateIsRegex: false
CommentOverPrivateFunction:
Expand Down Expand Up @@ -666,8 +666,6 @@ style:
active: true
OptionalUnit:
active: false
OptionalWhenBraces:
active: false
PreferToOverPairSyntax:
active: false
ProtectedMemberInFinalClass:
Expand Down
3 changes: 3 additions & 0 deletions config/license.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* 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/. */

0 comments on commit d3941e7

Please sign in to comment.