gallery: filter out data: urls

This commit is contained in:
Andrew Dolgov 2017-06-04 08:05:21 +03:00
parent a0d0507631
commit 7e16eb5022
1 changed files with 12 additions and 2 deletions

View File

@ -224,8 +224,18 @@ public class GalleryActivity extends CommonActivity {
if (imgSrcFirst.equals(src))
firstFound = true;
item.url = src;
item.type = GalleryEntry.GalleryEntryType.TYPE_IMAGE;
try {
Uri checkUri = Uri.parse(src);
if (!"data".equals(checkUri.getScheme().toLowerCase())) {
item.url = src;
item.type = GalleryEntry.GalleryEntryType.TYPE_IMAGE;
}
} catch (Exception e) {
e.printStackTrace();
}
}
if (firstFound && item.url != null) {