aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Geocache.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/Geocache.java')
-rw-r--r--main/src/cgeo/geocaching/Geocache.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/Geocache.java b/main/src/cgeo/geocaching/Geocache.java
index f6e3f18..a03f515 100644
--- a/main/src/cgeo/geocaching/Geocache.java
+++ b/main/src/cgeo/geocaching/Geocache.java
@@ -25,6 +25,7 @@ import cgeo.geocaching.list.StoredList;
import cgeo.geocaching.network.HtmlImage;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.utils.CancellableHandler;
+import cgeo.geocaching.utils.ImageUtils;
import cgeo.geocaching.utils.LazyInitializedList;
import cgeo.geocaching.utils.Log;
import cgeo.geocaching.utils.LogTemplateProvider;
@@ -159,6 +160,10 @@ public class Geocache implements ICache, IWaypoint {
private Handler changeNotificationHandler = null;
+ // Images whose URL contains one of those patterns will not be available on the Images tab
+ // for opening into an external application.
+ private final String[] NO_EXTERNAL = new String[]{"geocheck.org"};
+
/**
* Create a new cache. To be used everywhere except for the GPX parser
*/
@@ -1723,7 +1728,7 @@ public class Geocache implements ICache, IWaypoint {
Html.fromHtml(getDescription(), new ImageGetter() {
@Override
public Drawable getDrawable(final String source) {
- if (!urls.contains(source)) {
+ if (!urls.contains(source) && !ImageUtils.containsPattern(source, NO_EXTERNAL)) {
images.add(new Image(source, geocode));
urls.add(source);
}