From eeabf34dcd79f5f0b38b1608a66158628c0e7b76 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 25 Sep 2019 22:05:21 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/utils/ACache.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/utils/ACache.kt b/app/src/main/java/io/legado/app/utils/ACache.kt index 69603f9bd..c8ef92b26 100644 --- a/app/src/main/java/io/legado/app/utils/ACache.kt +++ b/app/src/main/java/io/legado/app/utils/ACache.kt @@ -9,6 +9,7 @@ import android.graphics.PixelFormat import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.Drawable import android.util.Log +import io.legado.app.App import org.json.JSONArray import org.json.JSONObject import java.io.* @@ -405,7 +406,7 @@ class ACache private constructor(cacheDir: File, max_size: Long, max_count: Int) */ private object Utils { - private val mSeparator = ' ' + private const val mSeparator = ' ' /** * 判断缓存的String数据是否到期 @@ -566,7 +567,7 @@ class ACache private constructor(cacheDir: File, max_size: Long, max_count: Int) fun bitmap2Drawable(bm: Bitmap?): Drawable? { return if (bm == null) { null - } else BitmapDrawable(bm) + } else BitmapDrawable(App.INSTANCE.resources, bm) } }