RecommendationsProvider: memory leak fix

This commit is contained in:
Yuriy Liskov
2026-06-05 18:21:46 +03:00
parent 6fd7cd071a
commit 342fda5b6d
@@ -32,12 +32,12 @@ public class RecommendationsProvider {
break;
}
Response response = OkHttpManager.instance().doGetRequest(clip.getCardImageUrl());
Bitmap image = null;
if (response.body() != null) {
image = BitmapFactory.decodeStream(response.body().byteStream());
try (Response response = OkHttpManager.instance().doGetRequest(clip.getCardImageUrl())) {
if (response.body() != null) {
image = BitmapFactory.decodeStream(response.body().byteStream());
}
}
Notification rec = new RecommendationBuilder()