diff --git a/android/src/org/transdroid/gui/TorrentsFragment.java b/android/src/org/transdroid/gui/TorrentsFragment.java index c9cfa482..125beccc 100644 --- a/android/src/org/transdroid/gui/TorrentsFragment.java +++ b/android/src/org/transdroid/gui/TorrentsFragment.java @@ -368,7 +368,8 @@ public class TorrentsFragment extends Fragment implements IDaemonCallback, OnTou // Intent should have some Uri data pointing to a single torrent String data = startIntent.getDataString(); if (data != null && startIntent.getData() != null && startIntent.getData().getScheme() != null) { - if (startIntent.getData().getScheme().equals(HttpHelper.SCHEME_HTTP)) { + if (startIntent.getData().getScheme().equals(HttpHelper.SCHEME_HTTP) + || startIntent.getData().getScheme().equals(HttpHelper.SCHEME_HTTPS)) { // From a global intent to add a .torrent file via URL (maybe form the browser) String title = data.substring(data.lastIndexOf("/")); if (startIntent.hasExtra(Transdroid.INTENT_TORRENT_TITLE)) { diff --git a/android/src/org/transdroid/service/UpdateService.java b/android/src/org/transdroid/service/UpdateService.java index f52ad2f7..89526170 100644 --- a/android/src/org/transdroid/service/UpdateService.java +++ b/android/src/org/transdroid/service/UpdateService.java @@ -19,6 +19,7 @@ package org.transdroid.service; import java.io.IOException; import java.io.InputStream; +import java.util.Random; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; @@ -58,6 +59,8 @@ public class UpdateService extends IntentService { private static final String DOWNLOAD_URL_SEARCH = "http://www.transdroid.org/latest-search"; private static final String LOG_NAME = "Update service"; private static NotificationManager notificationManager; + + private Random random = new Random(); public UpdateService() { super(LOG_NAME); @@ -91,7 +94,7 @@ public class UpdateService extends IntentService { // New version available! Notify the user. newNotification(getString(R.string.update_app_newversion), getString(R.string.update_app_newversion), getString(R.string.update_updateto, - app[1].trim()), DOWNLOAD_URL_APP, 0); + app[1].trim()), DOWNLOAD_URL_APP + "?" + Integer.toString(random.nextInt()), 0); } } catch (NameNotFoundException e) { // Not installed... this can never happen since this Service is part of the app itself. @@ -104,7 +107,7 @@ public class UpdateService extends IntentService { // New version available! Notify the user. newNotification(getString(R.string.update_search_newversion), getString(R.string.update_search_newversion), getString(R.string.update_updateto, - search[1].trim()), DOWNLOAD_URL_SEARCH, 0); + search[1].trim()), DOWNLOAD_URL_SEARCH + "?" + Integer.toString(random.nextInt()), 0); } } catch (NameNotFoundException e) { // The search module isn't installed yet at all; ignore and wait for the user to manually diff --git a/lib/src/org/transdroid/daemon/util/HttpHelper.java b/lib/src/org/transdroid/daemon/util/HttpHelper.java index dcfce506..e5c70f98 100644 --- a/lib/src/org/transdroid/daemon/util/HttpHelper.java +++ b/lib/src/org/transdroid/daemon/util/HttpHelper.java @@ -61,6 +61,7 @@ public class HttpHelper { public static final int DEFAULT_CONNECTION_TIMEOUT = 8000; public static final String SCHEME_HTTP = "http"; + public static final String SCHEME_HTTPS = "https"; public static final String SCHEME_MAGNET = "magnet"; public static final String SCHEME_FILE = "file";