Merge pull request #1301 from ag2s20150909/master

修复bug
pull/1303/head
kunfei 3 years ago committed by GitHub
commit cc4c429957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      app/build.gradle
  2. BIN
      app/cronetlib/cronet_api.jar
  3. BIN
      app/cronetlib/cronet_impl_common_java.jar
  4. BIN
      app/cronetlib/cronet_impl_native_java.jar
  5. 2
      app/src/main/assets/cronet.json
  6. 2
      app/src/main/assets/defaultData/rssSources.json
  7. 2
      app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt
  8. 6
      app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt
  9. 2
      app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt
  10. 2
      gradle.properties

@ -129,6 +129,8 @@ dependencies {
implementation('androidx.multidex:multidex:2.0.1')
//kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
//Kotlin反射
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
//
def coroutines_version = '1.5.1'
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
@ -137,19 +139,19 @@ dependencies {
//androidX
implementation('androidx.appcompat:appcompat:1.3.1')
implementation('androidx.core:core-ktx:1.6.0')
implementation("androidx.activity:activity-ktx:1.3.0")
implementation("androidx.activity:activity-ktx:1.3.1")
implementation("androidx.fragment:fragment-ktx:1.3.6")
implementation('androidx.preference:preference-ktx:1.1.1')
implementation('androidx.constraintlayout:constraintlayout:2.0.4')
implementation('androidx.constraintlayout:constraintlayout:2.1.0')
implementation('androidx.swiperefreshlayout:swiperefreshlayout:1.1.0')
implementation('androidx.viewpager2:viewpager2:1.0.0')
implementation('com.google.android.material:material:1.4.0')
implementation('com.google.android.flexbox:flexbox:3.0.0')
implementation('com.google.code.gson:gson:2.8.7')
implementation('com.google.code.gson:gson:2.8.8')
implementation('androidx.webkit:webkit:1.4.0')
//media
implementation("androidx.media:media:1.4.0")
implementation("androidx.media:media:1.4.1")
def exoplayer_version = '2.15.0'
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:extension-okhttp:$exoplayer_version"

Binary file not shown.

@ -1 +1 @@
{"arm64-v8a":"1f4e088f6e00175e12ee153e4004d283","armeabi-v7a":"a6726219c9a6217b95763baa3d61eb18","x86":"73b6a220fe16e0cdeebf1094980825c2","x86_64":"12fd5bb0a12664294b64fffccd326347","version":"92.0.4515.159"}
{"arm64-v8a":"18441011d4a2e3751b8152ad05ab24da","armeabi-v7a":"701930e54c2cfa3d6d0df37168ecc4a6","x86":"3d4ebb7f23b910a8b50a2966eb39bbe7","x86_64":"9be68a8e03867c8f844e8eec88fe09ed","version":"93.0.4577.62"}

@ -4,7 +4,7 @@
"enableJs": true,
"enabled": true,
"singleUrl": true,
"sourceIcon": "http:\/\/ku.mumuceo.com\/static\/images\/applogo\/yuedu.png",
"sourceIcon": "https:\/\/cdn.jsdelivr.net\/gh\/gedoor\/legado@master\/app\/src\/main\/res\/mipmap-hdpi\/ic_launcher.png",
"sourceName": "使用说明",
"sourceUrl": "https://www.yuque.com/legado"
},

@ -28,7 +28,7 @@ class CronetInterceptor(private val cookieJar: CookieJar?) : Interceptor {
response
} catch (e: Exception) {
//遇到Cronet处理有问题时的情况,如证书过期等等,回退到okhttp处理
if (e.message.toString().contains("ERR_CERT_", true)) {
if (e.message.toString().contains("ERR_CERT_", true)||e.message.toString().contains("ERR_SSL_",true)) {
chain.proceed(original)
} else {
throw e

@ -22,8 +22,8 @@ import java.util.*
object CronetLoader : CronetEngine.Builder.LibraryLoader() {
//https://storage.googleapis.com/chromium-cronet/android/92.0.4515.127/Release/cronet/libs/arm64-v8a/libcronet.92.0.4515.159.so
//https://cdn.jsdelivr.net/gh/ag2s20150909/cronet-repo@92.0.4515.127/cronet/92.0.4515.127/arm64-v8a/libcronet.92.0.4515.159.so.js
//https://storage.googleapis.com/chromium-cronet/android/92.0.4515.159/Release/cronet/libs/arm64-v8a/libcronet.92.0.4515.159.so
//https://cdn.jsdelivr.net/gh/ag2s20150909/cronet-repo@92.0.4515.159/cronet/92.0.4515.127/arm64-v8a/libcronet.92.0.4515.159.so.js
private const val TAG = "CronetLoader"
private const val soVersion = BuildConfig.Cronet_Version
private const val soName = "libcronet.$soVersion.so"
@ -161,7 +161,7 @@ object CronetLoader : CronetEngine.Builder.LibraryLoader() {
val appInfo = context.applicationInfo
val abiField = ApplicationInfo::class.java.getDeclaredField("primaryCpuAbi")
abiField.isAccessible = true
cpuAbi = abiField[appInfo] as String
cpuAbi = abiField.get(appInfo) as String?
} catch (e: Exception) {
e.printStackTrace()
}

@ -140,8 +140,6 @@ class CronetUrlRequestCallback @JvmOverloads internal constructor(
mResponseCondition.open()
this.eventListener?.callFailed(mCall, e)
responseCallback?.onFailure(mCall, e)
}

@ -22,4 +22,4 @@ kotlin.code.style=official
android.enableResourceOptimizations=true
CronetVersion=92.0.4515.159
CronetVersion=93.0.4577.62

Loading…
Cancel
Save