Skip to content

Commit

Permalink
修复解码大图时app奔溃的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojieonly committed Nov 14, 2024
1 parent 2c78dd0 commit 71b95e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/hippo/lib/image/Image.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class Image private constructor(
mObtainedDrawable = null
source?.let {
var simpleSize: Int? = null
if (source.available() > 5242880) {
simpleSize = source.available() / 5242880
if (source.available() > 8388608) {
simpleSize = source.available() / 8388608
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
val src = ImageDecoder.createSource(
Expand Down

0 comments on commit 71b95e8

Please sign in to comment.