[Android] [PATCH] Never load images via http from the main thread
Marc K
morckx at gmail.com
Mon Jun 12 22:06:39 CEST 2017
---
vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java b/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java
index 25cf9e413..7870eaf7a 100644
--- a/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java
+++ b/vlc-android/src/org/videolan/vlc/util/HttpImageLoader.java
@@ -109,7 +109,7 @@ public class HttpImageLoader implements Callbacks {
public static Bitmap downloadBitmap(String imageUrl) {
HttpURLConnection urlConnection = null;
Bitmap icon = getBitmapFromIconCache(imageUrl);
- if (icon != null)
+ if (icon != null || Looper.getMainLooper().getThread() == Thread.currentThread())
return icon;
try {
URL url = new URL(imageUrl);
--
2.11.0
More information about the Android
mailing list