Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
fenix
Commits
c9ed8a5b
Commit
c9ed8a5b
authored
Feb 01, 2021
by
rxu
Committed by
Christian Sadilek
Feb 22, 2021
Browse files
Add MOZILLA_ONLINE_ADDON_EXCLUSIONS for Mozilla Online builds
parent
cb246ed4
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/build.gradle
View file @
c9ed8a5b
...
...
@@ -41,6 +41,18 @@ android {
buildConfigField
"String"
,
"AMO_BASE_URL"
,
"\"https://addons.mozilla.org\""
buildConfigField
"String"
,
"AMO_COLLECTION_NAME"
,
"\"7dfae8669acc4312a65e8ba5553036\""
buildConfigField
"String"
,
"AMO_COLLECTION_USER"
,
"\"mozilla\""
// These add-ons should be excluded for Mozilla Online builds.
buildConfigField
"String[]"
,
"MOZILLA_ONLINE_ADDON_EXCLUSIONS"
,
"{"
+
"\"uBlock0@raymondhill.net\","
+
"\"firefox@ghostery.com\","
+
"\"jid1-MnnxcxisBPnSXQ@jetpack\","
+
"\"adguardadblocker@adguard.com\","
+
"\"foxyproxy@eric.h.jung\","
+
"\"{73a6fe31-595d-460b-a920-fcc0f8843232}\","
+
"\"jid1-BoFifL9Vbdl2zQ@jetpack\","
+
"\"woop-NoopscooPsnSXQ@jetpack\""
+
"}"
// This should be the base URL used to call the AMO API.
buildConfigField
"String"
,
"AMO_SERVER_URL"
,
"\"https://services.addons.mozilla.org\""
def
deepLinkSchemeValue
=
"fenix-dev"
...
...
app/src/main/java/org/mozilla/fenix/addons/AddonsManagementFragment.kt
View file @
c9ed8a5b
...
...
@@ -29,6 +29,8 @@ import mozilla.components.feature.addons.ui.AddonInstallationDialogFragment
import
mozilla.components.feature.addons.ui.AddonsManagerAdapter
import
mozilla.components.feature.addons.ui.PermissionsDialogFragment
import
mozilla.components.feature.addons.ui.translateName
import
org.mozilla.fenix.BuildConfig
import
org.mozilla.fenix.Config
import
org.mozilla.fenix.GleanMetrics.Addons
import
org.mozilla.fenix.R
import
org.mozilla.fenix.components.FenixSnackbar
...
...
@@ -105,6 +107,13 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management)
lifecycleScope
.
launch
(
IO
)
{
try
{
val
addons
=
requireContext
().
components
.
addonManager
.
getAddons
(
allowCache
=
allowCache
)
// Add-ons that should be excluded in Mozilla Online builds
val
excludedAddonIDs
=
if
(
Config
.
channel
.
isMozillaOnline
&&
!
BuildConfig
.
MOZILLA_ONLINE_ADDON_EXCLUSIONS
.
isNullOrEmpty
())
{
BuildConfig
.
MOZILLA_ONLINE_ADDON_EXCLUSIONS
.
toList
()
}
else
{
emptyList
<
String
>()
}
lifecycleScope
.
launch
(
Dispatchers
.
Main
)
{
runIfFragmentIsAttached
{
if
(!
shouldRefresh
)
{
...
...
@@ -112,7 +121,8 @@ class AddonsManagementFragment : Fragment(R.layout.fragment_add_ons_management)
requireContext
().
components
.
addonCollectionProvider
,
managementView
,
addons
,
style
=
createAddonStyle
(
requireContext
())
style
=
createAddonStyle
(
requireContext
()),
excludedAddonIDs
)
}
isInstallationInProgress
=
false
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment