mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] Bump application-services version and initialize networking in the megazord
This commit is contained in:
parent
418fae40b5
commit
41578b9632
@ -13,6 +13,7 @@ import kotlinx.coroutines.GlobalScope
|
|||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.coroutines.Deferred
|
import kotlinx.coroutines.Deferred
|
||||||
|
import mozilla.components.concept.fetch.Client
|
||||||
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
|
||||||
import mozilla.components.service.fretboard.Fretboard
|
import mozilla.components.service.fretboard.Fretboard
|
||||||
import mozilla.components.service.fretboard.source.kinto.KintoExperimentSource
|
import mozilla.components.service.fretboard.source.kinto.KintoExperimentSource
|
||||||
@ -162,8 +163,10 @@ open class FenixApplication : Application() {
|
|||||||
// As a workaround, use reflections to conditionally initialize the megazord in case it's present.
|
// As a workaround, use reflections to conditionally initialize the megazord in case it's present.
|
||||||
return try {
|
return try {
|
||||||
val megazordClass = Class.forName("mozilla.appservices.FenixMegazord")
|
val megazordClass = Class.forName("mozilla.appservices.FenixMegazord")
|
||||||
val megazordInitMethod = megazordClass.getDeclaredMethod("init")
|
val megazordInitMethod = megazordClass.getDeclaredMethod("init", Lazy::class.java)
|
||||||
megazordInitMethod.invoke(megazordClass)
|
// https://github.com/mozilla-mobile/android-components/issues/2715
|
||||||
|
val client: Lazy<Client> = lazy { HttpURLConnectionClient() }
|
||||||
|
megazordInitMethod.invoke(megazordClass, client)
|
||||||
true
|
true
|
||||||
} catch (e: ClassNotFoundException) {
|
} catch (e: ClassNotFoundException) {
|
||||||
Logger.info("mozilla.appservices.FenixMegazord not found; skipping megazord init.")
|
Logger.info("mozilla.appservices.FenixMegazord not found; skipping megazord init.")
|
||||||
|
@ -24,9 +24,9 @@ private object Versions {
|
|||||||
const val androidx_navigation = "2.1.0-alpha02"
|
const val androidx_navigation = "2.1.0-alpha02"
|
||||||
const val androidx_recyclerview = "1.1.0-alpha04"
|
const val androidx_recyclerview = "1.1.0-alpha04"
|
||||||
|
|
||||||
const val appservices_gradle_plugin = "0.4.2"
|
const val appservices_gradle_plugin = "0.4.4"
|
||||||
const val mozilla_android_components = "0.50.0-SNAPSHOT"
|
const val mozilla_android_components = "0.50.0-SNAPSHOT"
|
||||||
const val mozilla_appservices = "0.23.0"
|
const val mozilla_appservices = "0.25.2"
|
||||||
|
|
||||||
const val test_tools = "1.0.2"
|
const val test_tools = "1.0.2"
|
||||||
const val espresso_core = "2.2.2"
|
const val espresso_core = "2.2.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user