Loading mobile/android/base/java/org/mozilla/gecko/SuggestClient.java +5 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,11 @@ public class SuggestClient { return mPrevResults; ArrayList<String> suggestions = new ArrayList<String>(); if (AppConstants.isTorBrowser()) { Log.i(LOGTAG, "This is Tor Browser. Skipping."); return suggestions; } if (TextUtils.isEmpty(mSuggestTemplate) || TextUtils.isEmpty(query)) { return suggestions; } Loading mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topstories/PocketStoriesLoader.java +5 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,11 @@ public class PocketStoriesLoader extends AsyncTaskLoader<List<TopStory>> { } protected String makeAPIRequestWithKey(final String apiKey) { if (AppConstants.isTorBrowser()) { Log.i(LOGTAG, "This is Tor Browser. Skipping."); return null; } HttpURLConnection connection = null; final Uri uri = Uri.parse(GLOBAL_ENDPOINT) Loading mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java +5 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,11 @@ public class Distribution { return false; } if (AppConstants.isTorBrowser()) { Log.i(LOGTAG, "This is Tor Browser. Skipping."); return false; } URI uri = getReferredDistribution(referrer); if (uri == null) { return false; Loading mobile/android/base/java/org/mozilla/gecko/dlc/BaseAction.java +6 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,12 @@ public abstract class BaseAction { protected HttpURLConnection buildHttpURLConnection(String url) throws UnrecoverableDownloadContentException, IOException { try { if (AppConstants.isTorBrowser()) { String erdcl = "This is Tor Browser. Downloading is disabled for: " + url; Log.i(LOGTAG, "This is Tor Browser. Skipping."); throw new UnrecoverableDownloadContentException(erdcl); } System.setProperty("http.keepAlive", "true"); HttpURLConnection connection = (HttpURLConnection) ProxySelector.openConnectionWithProxy(new URI(url)); Loading mobile/android/base/java/org/mozilla/gecko/home/ImageLoader.java +7 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ import com.squareup.picasso.Picasso; import com.squareup.picasso.Downloader.Response; import com.squareup.picasso.UrlConnectionDownloader; import org.mozilla.gecko.AppConstants; import org.mozilla.gecko.util.ProxySelector; import java.io.File; Loading Loading @@ -91,6 +92,12 @@ public class ImageLoader { @Override protected HttpURLConnection openConnection(Uri path) throws IOException { if (AppConstants.isTorBrowser()) { String err = "This is Tor Browser. Downloading is disabled for: " + path.toString(); Log.i(LOGTAG, "This is Tor Browser. Skipping."); throw new IOException(err); } try { // This is annoying, but |path| is an android.net.Uri and // openConnectionWithProxy() accepts a java.net.URI Loading Loading
mobile/android/base/java/org/mozilla/gecko/SuggestClient.java +5 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,11 @@ public class SuggestClient { return mPrevResults; ArrayList<String> suggestions = new ArrayList<String>(); if (AppConstants.isTorBrowser()) { Log.i(LOGTAG, "This is Tor Browser. Skipping."); return suggestions; } if (TextUtils.isEmpty(mSuggestTemplate) || TextUtils.isEmpty(query)) { return suggestions; } Loading
mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topstories/PocketStoriesLoader.java +5 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,11 @@ public class PocketStoriesLoader extends AsyncTaskLoader<List<TopStory>> { } protected String makeAPIRequestWithKey(final String apiKey) { if (AppConstants.isTorBrowser()) { Log.i(LOGTAG, "This is Tor Browser. Skipping."); return null; } HttpURLConnection connection = null; final Uri uri = Uri.parse(GLOBAL_ENDPOINT) Loading
mobile/android/base/java/org/mozilla/gecko/distribution/Distribution.java +5 −0 Original line number Diff line number Diff line Loading @@ -555,6 +555,11 @@ public class Distribution { return false; } if (AppConstants.isTorBrowser()) { Log.i(LOGTAG, "This is Tor Browser. Skipping."); return false; } URI uri = getReferredDistribution(referrer); if (uri == null) { return false; Loading
mobile/android/base/java/org/mozilla/gecko/dlc/BaseAction.java +6 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,12 @@ public abstract class BaseAction { protected HttpURLConnection buildHttpURLConnection(String url) throws UnrecoverableDownloadContentException, IOException { try { if (AppConstants.isTorBrowser()) { String erdcl = "This is Tor Browser. Downloading is disabled for: " + url; Log.i(LOGTAG, "This is Tor Browser. Skipping."); throw new UnrecoverableDownloadContentException(erdcl); } System.setProperty("http.keepAlive", "true"); HttpURLConnection connection = (HttpURLConnection) ProxySelector.openConnectionWithProxy(new URI(url)); Loading
mobile/android/base/java/org/mozilla/gecko/home/ImageLoader.java +7 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ import com.squareup.picasso.Picasso; import com.squareup.picasso.Downloader.Response; import com.squareup.picasso.UrlConnectionDownloader; import org.mozilla.gecko.AppConstants; import org.mozilla.gecko.util.ProxySelector; import java.io.File; Loading Loading @@ -91,6 +92,12 @@ public class ImageLoader { @Override protected HttpURLConnection openConnection(Uri path) throws IOException { if (AppConstants.isTorBrowser()) { String err = "This is Tor Browser. Downloading is disabled for: " + path.toString(); Log.i(LOGTAG, "This is Tor Browser. Skipping."); throw new IOException(err); } try { // This is annoying, but |path| is an android.net.Uri and // openConnectionWithProxy() accepts a java.net.URI Loading