diff --git a/app/build.gradle b/app/build.gradle index 35a454b51..562bf79c8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" diff --git a/app/cronetlib/cronet_api.jar b/app/cronetlib/cronet_api.jar index 464e8f6bf..9a9cb0849 100644 Binary files a/app/cronetlib/cronet_api.jar and b/app/cronetlib/cronet_api.jar differ diff --git a/app/cronetlib/cronet_impl_common_java.jar b/app/cronetlib/cronet_impl_common_java.jar index b54f81b5b..5dd2cb1d0 100644 Binary files a/app/cronetlib/cronet_impl_common_java.jar and b/app/cronetlib/cronet_impl_common_java.jar differ diff --git a/app/cronetlib/cronet_impl_native_java.jar b/app/cronetlib/cronet_impl_native_java.jar index 1a29039ad..d679be20e 100644 Binary files a/app/cronetlib/cronet_impl_native_java.jar and b/app/cronetlib/cronet_impl_native_java.jar differ diff --git a/app/src/main/assets/cronet.json b/app/src/main/assets/cronet.json index 1e118c39d..97a9e03a2 100644 --- a/app/src/main/assets/cronet.json +++ b/app/src/main/assets/cronet.json @@ -1 +1 @@ -{"arm64-v8a":"1f4e088f6e00175e12ee153e4004d283","armeabi-v7a":"a6726219c9a6217b95763baa3d61eb18","x86":"73b6a220fe16e0cdeebf1094980825c2","x86_64":"12fd5bb0a12664294b64fffccd326347","version":"92.0.4515.159"} \ No newline at end of file +{"arm64-v8a":"18441011d4a2e3751b8152ad05ab24da","armeabi-v7a":"701930e54c2cfa3d6d0df37168ecc4a6","x86":"3d4ebb7f23b910a8b50a2966eb39bbe7","x86_64":"9be68a8e03867c8f844e8eec88fe09ed","version":"93.0.4577.62"} \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt index fc45331ff..c51c76ee5 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetInterceptor.kt @@ -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 diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt index c2c03fefa..67c48af5e 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt @@ -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() } diff --git a/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt b/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt index 04c4d7066..c00ec2de3 100644 --- a/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt +++ b/app/src/main/java/io/legado/app/help/http/cronet/CronetUrlRequestCallback.kt @@ -140,8 +140,6 @@ class CronetUrlRequestCallback @JvmOverloads internal constructor( mResponseCondition.open() this.eventListener?.callFailed(mCall, e) - - responseCallback?.onFailure(mCall, e) } diff --git a/gradle.properties b/gradle.properties index e8357fd01..dea2f01e9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,4 +22,4 @@ kotlin.code.style=official android.enableResourceOptimizations=true -CronetVersion=92.0.4515.159 +CronetVersion=93.0.4577.62