Repository navigation
Update glide to 5.0.9 / switch to imagedecoder - #1711
David-Development wants to merge 3 commits into
Conversation
Glide 5.0.9 declares minSdk 23, so the manifest merger refuses to build against it while we still claim API 21. AndroidX has moved to 23 as well, so this is where the dependency floor is heading anyway. Dropping API 21/22 drops Android 5.0 and 5.1. No code in the app guards on SDK_INT below 23, so nothing becomes dead with this change. Signed-off-by: David Luhmer <david-dev@live.de>
Glide 5.0.9 sets minCompileSdk=37, so the AAR metadata check fails on compileSdk 36. AGP 9.1.0 builds against 37 fine but warns that it was only tested up to 36, hence the suppress flag; it can go once we move to an AGP that lists 37 as supported. targetSdk stays at 36, so runtime behaviour is unchanged. Signed-off-by: David Luhmer <david-dev@live.de>
Glide 5.0.8 recommends switching to Android's ImageDecoder on API 29+ and fixed the OOM/ANR and unbounded-allocation bugs that made the option unsafe before, so 5.0.9 is the first release where turning it on makes sense. Glide keeps using BitmapFactory below API 29 by itself. setUriImageDecoderEnabled lets local Uris be decoded directly instead of through an InputStream wrapper, which is the path the notification thumbnails take. Hardware-bitmap gating is shared with the BitmapFactory path (DefaultOnHeaderDecodedListener honours ALLOW_HARDWARE_CONFIG), so the Palette call in FavIconHandler keeps getting a readable bitmap. setUseArrayPoolForImageDecoderByteBufferAllocation is deliberately left off: that is the allocation path 5.0.8 had to fix, and it only saves a double allocation. Signed-off-by: David Luhmer <david-dev@live.de>
7526567 to
a1fdfaf
Compare
pamod-madubashana
left a comment
There was a problem hiding this comment.
Bumps Glide to 5.0.9 and enables ImageDecoder for bitmaps and Uris, raising minSdk to 23 and compileSdk to 37. The compileSdk bump breaks the build on current CI images so it should not merge as-is.
| ANDROID_BUILD_MIN_SDK_VERSION=23 | ||
| ANDROID_BUILD_TARGET_SDK_VERSION=36 | ||
| ANDROID_BUILD_SDK_VERSION=36 | ||
| ANDROID_BUILD_SDK_VERSION=37 |
There was a problem hiding this comment.
Setting compileSdk to 37 breaks the build because the SDK manager installs the platform as 37.0 under a different folder name, so AGP fails with Failed to find target with hash string 'android-37' and no APK or lint output can be produced. I confirmed both the APK and lint jobs fail with this exact error on this branch. Please keep compileSdk on 36 until the CI image and AGP resolve the android-37 target, or switch the value to the 37.0 naming the SDK actually provides.
superseeds #1703
Side effect.. we'd have to drop API level 21... (upgrade to 23)