pull/1391/head
gedoor 3 years ago
parent 32335c9ee1
commit 316f43f840
  1. 2
      app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt
  2. 4
      app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt

@ -38,7 +38,7 @@ val cronetEngine: ExperimentalCronetEngine by lazy {
val engine = try { val engine = try {
builder.build() builder.build()
} catch (e: Exception) { } catch (e: Exception) {
CronetLoader.preDownload() builder.setLibraryLoader(CronetLoader)//设置自定义so库加载
builder.build() builder.build()
} }
Timber.d("Cronet Version:" + engine.versionString) Timber.d("Cronet Version:" + engine.versionString)

@ -77,10 +77,6 @@ object CronetLoader : CronetEngine.Builder.LibraryLoader() {
* 预加载Cronet * 预加载Cronet
*/ */
fun preDownload() { fun preDownload() {
if (AppConfig.isGooglePlay) {
CronetProviderInstaller.installProvider(appCtx)
return
}
Coroutine.async { Coroutine.async {
//md5 = getUrlMd5(md5Url) //md5 = getUrlMd5(md5Url)
if (soFile.exists() && md5 == getFileMD5(soFile)) { if (soFile.exists() && md5 == getFileMD5(soFile)) {

Loading…
Cancel
Save