From bf34a0296f1ff12ecc78a71853c1e8f265ac058a Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 4 Jul 2019 17:12:28 +0300 Subject: [PATCH] Fix check for images types --- .../osmand/plus/myplaces/TrackActivityFragmentAdapter.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java b/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java index 4483c3647d..0bfcbe1db5 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/TrackActivityFragmentAdapter.java @@ -502,7 +502,12 @@ public class TrackActivityFragmentAdapter implements TrackBitmapDrawerListener { private String getMetadataImageLink(@NonNull GPXUtilities.Metadata metadata) { String link = metadata.link; if (!TextUtils.isEmpty(link)) { - if (link.contains(".jpg") || link.contains(".gif") || link.contains(".jpeg") || link.contains(".png") || link.contains(".bmp") || link.contains(".webp")) { + String lowerCaseLink = link.toLowerCase(); + if (lowerCaseLink.contains(".jpg") + || lowerCaseLink.contains(".jpeg") + || lowerCaseLink.contains(".png") + || lowerCaseLink.contains(".bmp") + || lowerCaseLink.contains(".webp")) { return link; } }