imagecacheservice: enforce data read timeout

This commit is contained in:
Andrew Dolgov 2013-07-30 00:00:57 +04:00
parent e2b195e5ed
commit 30af06f37f

View File

@ -119,6 +119,7 @@ public class ImageCacheService extends IntentService {
URL url = new URL(urlString);
URLConnection urlConnection = url.openConnection();
urlConnection.setConnectTimeout(250);
urlConnection.setReadTimeout(15*1000);
return urlConnection.getInputStream();
} catch (Exception ex) {
return null;