diff --git a/src/org/thoughtcrime/securesms/linkpreview/LinkPreviewDomains.java b/src/org/thoughtcrime/securesms/linkpreview/LinkPreviewDomains.java deleted file mode 100644 index 64baa6d42a..0000000000 --- a/src/org/thoughtcrime/securesms/linkpreview/LinkPreviewDomains.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.thoughtcrime.securesms.linkpreview; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -public class LinkPreviewDomains { - public static final String STICKERS = "signal.org"; - - public static final Set LINKS = new HashSet<>(Arrays.asList( - // YouTube - "youtube.com", - "www.youtube.com", - "m.youtube.com", - "youtu.be", - // Reddit - "reddit.com", - "www.reddit.com", - "m.reddit.com", - // Imgur - "imgur.com", - "www.imgur.com", - "m.imgur.com", - // Instagram - "instagram.com", - "www.instagram.com", - "m.instagram.com", - // Pinterest - "pinterest.com", - "www.pinterest.com", - "pin.it", - // Giphy - "giphy.com", - "media.giphy.com", - "media1.giphy.com", - "media2.giphy.com", - "media3.giphy.com", - "gph.is" - )); - - public static final Set IMAGES = new HashSet<>(Arrays.asList( - "ytimg.com", - "cdninstagram.com", - "fbcdn.net", - "redd.it", - "imgur.com", - "pinimg.com", - "giphy.com" - )); -} diff --git a/src/org/thoughtcrime/securesms/net/ContentProxySelector.java b/src/org/thoughtcrime/securesms/net/ContentProxySelector.java index e370042af4..29418f34e3 100644 --- a/src/org/thoughtcrime/securesms/net/ContentProxySelector.java +++ b/src/org/thoughtcrime/securesms/net/ContentProxySelector.java @@ -1,13 +1,9 @@ package org.thoughtcrime.securesms.net; -import android.os.AsyncTask; - -import org.thoughtcrime.securesms.linkpreview.LinkPreviewDomains; import org.thoughtcrime.securesms.logging.Log; import network.loki.messenger.BuildConfig; -import org.thoughtcrime.securesms.util.Util; import java.io.IOException; import java.net.InetSocketAddress; @@ -27,8 +23,7 @@ public class ContentProxySelector extends ProxySelector { private static final Set WHITELISTED_DOMAINS = new HashSet<>(); static { - WHITELISTED_DOMAINS.addAll(LinkPreviewDomains.LINKS); - WHITELISTED_DOMAINS.addAll(LinkPreviewDomains.IMAGES); + WHITELISTED_DOMAINS.add("giphy.com"); } private final List CONTENT = new ArrayList(1) {{