From 5577470d0b17bebf170e88a6bd211a117743b3a1 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Thu, 19 Sep 2019 20:36:22 +0200 Subject: [PATCH] No bug - Add WebCompat feature. --- app/build.gradle | 1 + app/src/main/java/org/mozilla/fenix/components/Core.kt | 5 ++++- buildSrc/src/main/java/Dependencies.kt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 9962be9f1..94306c320 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -402,6 +402,7 @@ dependencies { implementation Deps.mozilla_feature_readerview implementation Deps.mozilla_feature_tab_collections implementation Deps.mozilla_feature_sendtab + implementation Deps.mozilla_feature_webcompat implementation Deps.mozilla_service_firefox_accounts implementation Deps.mozilla_service_fretboard 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 02a2db9d0..0db566fc0 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Core.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -29,6 +29,7 @@ import mozilla.components.feature.media.MediaFeature import mozilla.components.feature.media.RecordingDevicesNotificationFeature import mozilla.components.feature.media.state.MediaStateMachine import mozilla.components.feature.session.HistoryDelegate +import mozilla.components.feature.webcompat.WebCompatFeature import org.mozilla.fenix.AppRequestInterceptor import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.ext.components @@ -59,7 +60,9 @@ class Core(private val context: Context) { allowAutoplayMedia = context.settings.isAutoPlayEnabled ) - GeckoEngine(context, defaultSettings, GeckoProvider.getOrCreateRuntime(context)) + GeckoEngine(context, defaultSettings, GeckoProvider.getOrCreateRuntime(context)).also { + WebCompatFeature.install(it) + } } /** diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index b3c576868..3fef2d447 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -132,6 +132,7 @@ object Deps { const val mozilla_feature_readerview = "org.mozilla.components:feature-readerview:${Versions.mozilla_android_components}" const val mozilla_feature_tab_collections = "org.mozilla.components:feature-tab-collections:${Versions.mozilla_android_components}" const val mozilla_feature_sendtab = "org.mozilla.components:feature-sendtab:${Versions.mozilla_android_components}" + const val mozilla_feature_webcompat = "org.mozilla.components:feature-webcompat:${Versions.mozilla_android_components}" const val mozilla_service_firefox_accounts = "org.mozilla.components:service-firefox-accounts:${Versions.mozilla_android_components}" const val mozilla_service_fretboard = "org.mozilla.components:service-fretboard:${Versions.mozilla_android_components}"