diff --git a/app/cronetlib/cronet_api.jar b/app/cronetlib/cronet_api.jar index af1fe5c36..5898e280d 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 136bcbe72..4ead4d6d7 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/src/main/assets/cronet.json b/app/src/main/assets/cronet.json index e720b0441..a850c4c64 100644 --- a/app/src/main/assets/cronet.json +++ b/app/src/main/assets/cronet.json @@ -1 +1 @@ -{"x86_64":"7d572f0d9b1097018e3d190ef4c0b32c","armeabi-v7a":"3a7375fb6d587b6b583ee017705978d8","arm64-v8a":"e8d2e9daca3a7095c4f045e6c84b9988","x86":"48864ce84335a1783aaa81d2ab09c8cd","version":"100.0.4896.88"} \ No newline at end of file +{"x86_64":"c81b8f347139d480e02e039ee54ded2c","armeabi-v7a":"376f6fe95055a4c3e58d6ba5a775295e","arm64-v8a":"67d683961c2e605a0595dbea4a099070","x86":"533ebbf13b68a92ae940a8c3d176ccf2","version":"100.0.4896.127"} \ No newline at end of file diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index f35bc6e90..8d0430587 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -13,6 +13,7 @@ **2022/04/14** +* 更新cronet: 100.0.4896.127 * 修复解码正文图片报错,添加解码日志 * js文档:java.toast java.longToast * cookie保存策略更改,若登录失效请重新登录 diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt index 8696cf9d5..70eaacae0 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt @@ -43,11 +43,9 @@ object ImageProvider { oldBitmap: Bitmap, newBitmap: Bitmap? ) { - if (evicted) { - oldBitmap.recycle() - putDebug("ImageProvider: trigger bitmap recycle. URI: $key") - putDebug("ImageProvider : cacheUsage ${size()}bytes / ${maxSize()}bytes") - } + oldBitmap.recycle() + putDebug("ImageProvider: trigger bitmap recycle. URI: $key") + putDebug("ImageProvider : cacheUsage ${size()}bytes / ${maxSize()}bytes") } } @@ -117,6 +115,17 @@ object ImageProvider { ?: throw NoStackTraceException("解析图片失败") bitmapLruCache.put(src, bitmap) bitmap + }.onFailure { + Coroutine.async { + putDebug( + "ImageProvider: decode bitmap failed. path: ${vFile.absolutePath}\n$it", + it + ) + if (FileUtils.readText(vFile.absolutePath).isXml()) { + putDebug("ImageProvider: delete xml file. path: ${vFile.absolutePath}") + vFile.delete() + } + } }.getOrDefault(errorBitmap) } diff --git a/gradle.properties b/gradle.properties index b603501f9..8a4de3489 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,4 +23,4 @@ kotlin.code.style=official android.enableResourceOptimizations=true #https://chromiumdash.appspot.com/releases?platform=Android -CronetVersion=100.0.4896.88 +CronetVersion=100.0.4896.127