diff --git a/app/src/main/java/org/fdroid/fdroid/net/ApkDownloader.java b/app/src/main/java/org/fdroid/fdroid/net/ApkDownloader.java index 7698c2ccd..8e54f1d87 100644 --- a/app/src/main/java/org/fdroid/fdroid/net/ApkDownloader.java +++ b/app/src/main/java/org/fdroid/fdroid/net/ApkDownloader.java @@ -197,7 +197,7 @@ public class ApkDownloader implements AsyncDownloader.Listener { Utils.debugLog(TAG, "Downloading apk from " + remoteAddress + " to " + localFile); try { - dlWrapper = DownloaderFactory.createAsync(context, remoteAddress, localFile, app.name + " " + curApk.version, curApk.packageName, credentials, this); + dlWrapper = DownloaderFactory.createAsync(context, remoteAddress, localFile, credentials, this); dlWrapper.download(); return true; } catch (IOException e) { diff --git a/app/src/main/java/org/fdroid/fdroid/net/DownloaderFactory.java b/app/src/main/java/org/fdroid/fdroid/net/DownloaderFactory.java index b65001cb8..d50896a43 100644 --- a/app/src/main/java/org/fdroid/fdroid/net/DownloaderFactory.java +++ b/app/src/main/java/org/fdroid/fdroid/net/DownloaderFactory.java @@ -22,29 +22,9 @@ public class DownloaderFactory { */ public static Downloader create(Context context, String urlString) throws IOException { - return create(context, new URL(urlString)); - } - - /** - * Downloads to a temporary file, which *you must delete yourself when - * you are done. It is stored in {@link Context#getCacheDir()} and starts - * with the prefix {@code dl-}. - */ - public static Downloader create(Context context, URL url) - throws IOException { File destFile = File.createTempFile("dl-", "", context.getCacheDir()); destFile.deleteOnExit(); // this probably does nothing, but maybe... - return create(context, url, destFile); - } - - public static Downloader create(Context context, String urlString, File destFile) - throws IOException { - return create(context, new URL(urlString), destFile); - } - - public static Downloader create(Context context, URL url, File destFile) - throws IOException { - return create(context, url, destFile, null); + return create(context, new URL(urlString), destFile, null); } public static Downloader create(Context context, URL url, File destFile, Credentials credentials) @@ -84,7 +64,8 @@ public class DownloaderFactory { return "file".equalsIgnoreCase(url.getProtocol()); } - public static AsyncDownloader createAsync(Context context, String urlString, File destFile, String title, String id, Credentials credentials, AsyncDownloader.Listener listener) throws IOException { + public static AsyncDownloader createAsync(Context context, String urlString, File destFile, Credentials credentials, AsyncDownloader.Listener listener) + throws IOException { URL url = new URL(urlString); return new AsyncDownloadWrapper(create(context, url, destFile, credentials), listener); }