2
0
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:
Thom Chiovoloni 2019-04-16 08:13:34 -07:00
parent 418fae40b5
commit 41578b9632
2 changed files with 7 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.Deferred
import mozilla.components.concept.fetch.Client
import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient
import mozilla.components.service.fretboard.Fretboard
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.
return try {
val megazordClass = Class.forName("mozilla.appservices.FenixMegazord")
val megazordInitMethod = megazordClass.getDeclaredMethod("init")
megazordInitMethod.invoke(megazordClass)
val megazordInitMethod = megazordClass.getDeclaredMethod("init", Lazy::class.java)
// https://github.com/mozilla-mobile/android-components/issues/2715
val client: Lazy<Client> = lazy { HttpURLConnectionClient() }
megazordInitMethod.invoke(megazordClass, client)
true
} catch (e: ClassNotFoundException) {
Logger.info("mozilla.appservices.FenixMegazord not found; skipping megazord init.")

View File

@ -24,9 +24,9 @@ private object Versions {
const val androidx_navigation = "2.1.0-alpha02"
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_appservices = "0.23.0"
const val mozilla_appservices = "0.25.2"
const val test_tools = "1.0.2"
const val espresso_core = "2.2.2"