2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-02 03:40:16 +00:00

Bump application-services version and initialize networking in the megazord

This commit is contained in:
Colin Lee 2019-04-17 11:22:57 -05:00
commit 62937cd7f0
2 changed files with 9 additions and 5 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,10 +24,10 @@ 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 autodispose = "1.1.0"
const val adjust = "4.11.4"
const val installreferrer = "1.0"
@ -45,6 +45,7 @@ private object Versions {
const val tools_test_rules = "1.1.1"
const val tools_test_runner = "1.1.1"
const val uiautomator = "2.1.3"
const val test_tools = "1.0.2"
}
@Suppress("unused")