Commit 37498246 authored by Geoffrey Métais's avatar Geoffrey Métais

Check url validity before downloading

parent c6037419
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment