Skip to content

Update glide to 5.0.9 / switch to imagedecoder - #1711

Open
David-Development wants to merge 3 commits into
masterfrom
chore/glide-509-imagedecoder
Open

David-Development wants to merge 3 commits into
masterfrom
chore/glide-509-imagedecoder

Conversation

@David-Development

@David-Development David-Development commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

superseeds #1703

Side effect.. we'd have to drop API level 21... (upgrade to 23)

@David-Development David-Development changed the title Chore/glide 509 imagedecoder Update glide to 5.0.9 / switch to imagedecoder Aug 30, 2026
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>
@David-Development
David-Development force-pushed the chore/glide-509-imagedecoder branch from 7526567 to a1fdfaf Compare September 30, 2026 15:58

@pamod-madubashana pamod-madubashana left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread gradle.properties
ANDROID_BUILD_MIN_SDK_VERSION=23
ANDROID_BUILD_TARGET_SDK_VERSION=36
ANDROID_BUILD_SDK_VERSION=36
ANDROID_BUILD_SDK_VERSION=37

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants