|
|
|
@ -3,7 +3,6 @@ package io.legado.app.help.http |
|
|
|
|
import io.legado.app.help.AppConfig |
|
|
|
|
import io.legado.app.help.http.cronet.CronetInterceptor |
|
|
|
|
import io.legado.app.help.http.cronet.CronetLoader |
|
|
|
|
import io.legado.app.help.http.cronet.cronetEngine |
|
|
|
|
import okhttp3.ConnectionSpec |
|
|
|
|
import okhttp3.Credentials |
|
|
|
|
import okhttp3.Interceptor |
|
|
|
@ -44,7 +43,7 @@ val okHttpClient: OkHttpClient by lazy { |
|
|
|
|
.build() |
|
|
|
|
chain.proceed(request) |
|
|
|
|
}) |
|
|
|
|
if (AppConfig.isCronet && CronetLoader.install() && cronetEngine != null) { |
|
|
|
|
if (AppConfig.isCronet && CronetLoader.install() && !AppConfig.isGooglePlay) { |
|
|
|
|
builder.addInterceptor(CronetInterceptor(null)) |
|
|
|
|
} |
|
|
|
|
builder.build() |
|
|
|
|