Skip to content

Commit f45ea99

Browse files
committed
Clean code
1 parent efcec08 commit f45ea99

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

library/src/com/nostra13/universalimageloader/core/download/BaseImageDownloader.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,16 @@ protected InputStream getStreamFromFile(String imageUri, Object extra) throws IO
171171
*/
172172
protected InputStream getStreamFromContent(String imageUri, Object extra) throws FileNotFoundException {
173173
ContentResolver res = context.getContentResolver();
174-
Uri uri = Uri.parse(imageUri);
175174

175+
Uri uri = Uri.parse(imageUri);
176176
if (isVideoUri(uri)) {
177177
Long origId = Long.valueOf(uri.getLastPathSegment());
178178
Bitmap bitmap = MediaStore.Video.Thumbnails
179179
.getThumbnail(res, origId, MediaStore.Images.Thumbnails.MINI_KIND, null);
180180
if (bitmap != null) {
181181
ByteArrayOutputStream bos = new ByteArrayOutputStream();
182182
bitmap.compress(CompressFormat.PNG, 0, bos);
183-
byte[] bmpData = bos.toByteArray();
184-
return new ByteArrayInputStream(bmpData);
183+
return new ByteArrayInputStream(bos.toByteArray());
185184
}
186185
}
187186

0 commit comments

Comments
 (0)