gallery: filter out data: urls
This commit is contained in:
parent
a0d0507631
commit
7e16eb5022
@ -224,10 +224,20 @@ public class GalleryActivity extends CommonActivity {
|
|||||||
if (imgSrcFirst.equals(src))
|
if (imgSrcFirst.equals(src))
|
||||||
firstFound = true;
|
firstFound = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
Uri checkUri = Uri.parse(src);
|
||||||
|
|
||||||
|
if (!"data".equals(checkUri.getScheme().toLowerCase())) {
|
||||||
item.url = src;
|
item.url = src;
|
||||||
item.type = GalleryEntry.GalleryEntryType.TYPE_IMAGE;
|
item.type = GalleryEntry.GalleryEntryType.TYPE_IMAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (firstFound && item.url != null) {
|
if (firstFound && item.url != null) {
|
||||||
m_items.add(item);
|
m_items.add(item);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user