pull/35/head
kunfei 5 years ago
parent 8c360c7d88
commit eeabf34dcd
  1. 5
      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.BitmapDrawable
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.util.Log import android.util.Log
import io.legado.app.App
import org.json.JSONArray import org.json.JSONArray
import org.json.JSONObject import org.json.JSONObject
import java.io.* import java.io.*
@ -405,7 +406,7 @@ class ACache private constructor(cacheDir: File, max_size: Long, max_count: Int)
*/ */
private object Utils { private object Utils {
private val mSeparator = ' ' private const val mSeparator = ' '
/** /**
* 判断缓存的String数据是否到期 * 判断缓存的String数据是否到期
@ -566,7 +567,7 @@ class ACache private constructor(cacheDir: File, max_size: Long, max_count: Int)
fun bitmap2Drawable(bm: Bitmap?): Drawable? { fun bitmap2Drawable(bm: Bitmap?): Drawable? {
return if (bm == null) { return if (bm == null) {
null null
} else BitmapDrawable(bm) } else BitmapDrawable(App.INSTANCE.resources, bm)
} }
} }

Loading…
Cancel
Save