butterproject / butter-android

All the cool technical bits of what used to be Popcorn Time for Android
Other
314 stars 369 forks source link

Glide Bitmap releasing for BackgroundManager #288

Open blazsolar opened 6 years ago

blazsolar commented 6 years ago

Glide is releasing resources when new one is loaded or target cleared. Since we are using BackgroundManager and it has its own implementation for changing and updating images. We run into an issue where Glide already releases bitmap that is still displayed on background causing an app to crash. This is due to a fact that BackgroundManager uses delay to display background so that it is not switching constantly.

Solution here could be to manually handle Glide.clear events for target or to not use Glide for background images.