1
0
Fork 0

Bug 1643132 - Add WebCompat Reporter feature.

master
Dennis Schubert 2020-06-03 20:50:58 +02:00 committed by Emily Kager
parent d046d908fc
commit e41fc7841a
3 changed files with 18 additions and 0 deletions

View File

@ -500,6 +500,7 @@ dependencies {
implementation Deps.mozilla_feature_accounts_push
implementation Deps.mozilla_feature_webcompat
implementation Deps.mozilla_feature_webnotifications
implementation Deps.mozilla_feature_webcompat_reporter
implementation Deps.mozilla_service_experiments
implementation Deps.mozilla_service_sync_logins

View File

@ -38,6 +38,7 @@ import mozilla.components.feature.pwa.WebAppShortcutManager
import mozilla.components.feature.readerview.ReaderViewMiddleware
import mozilla.components.feature.session.HistoryDelegate
import mozilla.components.feature.webcompat.WebCompatFeature
import mozilla.components.feature.webcompat.reporter.WebCompatReporterFeature
import mozilla.components.feature.webnotifications.WebNotificationFeature
import mozilla.components.lib.dataprotect.SecureAbove22Preferences
import mozilla.components.lib.dataprotect.generateEncryptionKey
@ -46,6 +47,7 @@ import org.mozilla.fenix.AppRequestInterceptor
import org.mozilla.fenix.Config
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.ReleaseChannel
import org.mozilla.fenix.downloads.DownloadService
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings
@ -84,6 +86,20 @@ class Core(private val context: Context) {
GeckoProvider.getOrCreateRuntime(context, lazyPasswordsStorage)
).also {
WebCompatFeature.install(it)
/**
* There are some issues around localization to be resolved, as well as questions around
* the capacity of the WebCompat team, so the "Report site issue" feature should stay
* disabled in Fenix Release builds for now.
* This is consistent with both Fennec and Firefox Desktop.
*/
val shouldEnableWebcompatReporter = Config.channel !in setOf(
ReleaseChannel.FenixProduction,
ReleaseChannel.FennecProduction
)
if (shouldEnableWebcompatReporter) {
WebCompatReporterFeature.install(it)
}
}
}

View File

@ -114,6 +114,7 @@ object Deps {
const val mozilla_feature_share = "org.mozilla.components:feature-share:${Versions.mozilla_android_components}"
const val mozilla_feature_webcompat = "org.mozilla.components:feature-webcompat:${Versions.mozilla_android_components}"
const val mozilla_feature_webnotifications = "org.mozilla.components:feature-webnotifications:${Versions.mozilla_android_components}"
const val mozilla_feature_webcompat_reporter = "org.mozilla.components:feature-webcompat-reporter:${Versions.mozilla_android_components}"
const val mozilla_service_experiments =
"org.mozilla.components:service-experiments:${Versions.mozilla_android_components}"