Skip to content
Snippets Groups Projects
Commit 4a0848de authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Check url validity before downloading

(cherry picked from commit 37498246)
parent bc6096b7
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,8 @@ public class HttpImageLoader implements Callbacks {
Bitmap icon = null;
try {
URL url = new URL(imageUrl);
if (url.getPort() <= 0)
return null;
urlConnection = (HttpURLConnection) url.openConnection();
InputStream in = new BufferedInputStream(urlConnection.getInputStream());
icon = BitmapFactory.decodeStream(in);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment