mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-10-02 10:04:36 +08:00
RecommendationsProvider: memory leak fix
This commit is contained in:
+4
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user