Glide 4.2.0
This is the September release of Glide.
Features
- Added support for replacing Glide's default
Encoders
(03f5bd4, #2349, thanks to @MistaGreen) - Added a more advanced way to control how/when requests are restarted when they have the same cache keys (b667cab, thanks to @Tolriq).
- Repackaged Glide's annotation processor dependencies to avoid build errors with the generated API caused by dependency conflicts (a0e388e, #2059, thanks to @TWiStErRob)
- Added a bucketing system when registering custom components to make choosing the order in which the components are called easier and more intuitive (da90633, thanks to asuszek@).
- Pass
Options
toResourceTranscoders
to allow customizing behavior (134870e, #2417). - Added an interface to allow reporting or uncaught exceptions on Glide's thread pools (a1cd3af, thanks to @stephanenicolas)
Bug fixes
- Fixed incorrect Bitmap pool sizes on some versions of Android (fe5289d, #2334, thanks to @SUPERCILEX)
- Fixed a resource leak when following redirects in Glide's default Http library (7f62597, 73a8054, #2352)
- Fixed a racy resource leak where
DataFetchers
were sometimes never closed (d482b8e) - Fixed load failures due to a simultaneous put exception in Glide's default disk cache (01f5a3d)
- Fixed Http load failures caused by unexpected characters in the user agent of some devices (3cd0685)
- Worked around an O specific ClassCastException in the OkHttp support library (a4af922)
- Fixed logic in
RequestFutureTarget
to better match theFuture
documentation (f033e9b) - Fixed a few rounding issues when downsampling and transforming images to eliminate hardware bitmap errors and wasteful allocations when decoded Bitmaps from
Downsampler
are ~1 pixel off of the size required byTransformations
(f5ba374, b1b024e, 4b5ccaa) - Fix
get(View)
failing to find non-supportFragments
(a0c5af1) - Add better null handling to
ListPreloader
(c3479c4, #2379) - Fixed assertions when generated
GlideRequests
were used to load a model and then modified after the load was started (d56e08c). - Fixed load failures on some devices where UUIDs initialization is broken (d67ce32, #1510)
- Improved performance loading video frames slightly be avoiding duplicate
setDataSource
calls (a84deb3). - Handle all types of exceptions thrown by
ResourceDecoders
to allow other registeredResourceDecoders
to run even if one decoder fails or behaves unexpectedly (6cffaab). - Fixed an exception using
HARDWARE
Bitmaps with images where Glide is unable to determine the original dimensions (f9757a5). - Fixed an issue where sometimes the MediaStore thumbnail would be returned when
Target.SIZE_ORIGINAL
was used (4501396, thanks to asuszek@).
Documentation
- Added links to a Simplified Chinese translation of Glide's documentation page (ee557b6, thanks to @Muyangmin)
- Added Google's maven repo for support libraries to the setup example in the readme (3bf2d36, thanks to @rocboronat)
Behavior changes
- Calling
into()
orclear()
in aRequestListener
orTarget
implementation will now always crash with an assertion. Previously it would sometimes crash depending on how the request was configured. To avoid the exception, you can useHandler#post
to post yourinto()
orclear()
call to the main thread instead of calling it directly (6fb87b3, #2413) - Glide's interpretation of View sizes has changed substantially, see #2431 for more details.
- Changed the default downsample strategy to
CENTER_OUTSIDE
on KitKat+ for cases where neither a strategy nor a transformation that uses a strategy is applied to a load (8a90f54, thanks to asuszek@).