pull/1787/head
kunfei 3 years ago
parent cc1768bd66
commit 116b843ee8
  1. 1
      app/src/main/assets/updateLog.md
  2. 2
      app/src/main/java/io/legado/app/help/http/cronet/CronetHelper.kt
  3. 3
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ImageProvider.kt

@ -16,6 +16,7 @@
* 修复解码正文图片报错,添加解码日志 * 修复解码正文图片报错,添加解码日志
* js文档:java.toast java.longToast * js文档:java.toast java.longToast
* cookie保存策略更改,若登录失效请重新登录 * cookie保存策略更改,若登录失效请重新登录
* cronet和okHttp共用线程池
**2022/04/12** **2022/04/12**

@ -15,8 +15,6 @@ import org.chromium.net.UrlRequest
import splitties.init.appCtx import splitties.init.appCtx
//val executor: ExecutorService by lazy { Executors.newCachedThreadPool() }
val cronetEngine: ExperimentalCronetEngine? by lazy { val cronetEngine: ExperimentalCronetEngine? by lazy {
if (!AppConfig.isGooglePlay) { if (!AppConfig.isGooglePlay) {
CronetLoader.preDownload() CronetLoader.preDownload()

@ -55,6 +55,9 @@ object ImageProvider {
// inJustDecodeBounds如果设置为true,仅仅返回图片实际的宽和高,宽和高是赋值给opts.outWidth,opts.outHeight; // inJustDecodeBounds如果设置为true,仅仅返回图片实际的宽和高,宽和高是赋值给opts.outWidth,opts.outHeight;
op.inJustDecodeBounds = true op.inJustDecodeBounds = true
BitmapFactory.decodeFile(file.absolutePath, op) BitmapFactory.decodeFile(file.absolutePath, op)
if (op.outWidth == 0 && op.outHeight == 0) {
return Size(errorBitmap.width, errorBitmap.height)
}
return Size(op.outWidth, op.outHeight) return Size(op.outWidth, op.outHeight)
} }

Loading…
Cancel
Save