From 6cc1880b1766ffa7e32bd4638ad5f04b216678b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 22 Aug 2013 17:15:50 +0200 Subject: [PATCH] Remove code that copied icons from .fdroid for the 0.46->0.50 update --- src/org/fdroid/fdroid/UpdateService.java | 28 ++++-------------------- 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/src/org/fdroid/fdroid/UpdateService.java b/src/org/fdroid/fdroid/UpdateService.java index 3fe96c843..c1151c399 100644 --- a/src/org/fdroid/fdroid/UpdateService.java +++ b/src/org/fdroid/fdroid/UpdateService.java @@ -365,31 +365,11 @@ public class UpdateService extends IntentService implements ProgressListener { if (server == null) return; - // TODO: Remove this later - // If we can find the icon in the old .fdroid directory, use that - // instead of re-downloading it. - File oldfile = new File(Environment.getExternalStorageDirectory(), - ".fdroid/icons/" + app.icon); - if (oldfile.exists()) { - // Try and move it - should succeed if it's on the same - // filesystem. - if(oldfile.renameTo(f)) - return; - // Otherwise we'll have to copy... - input = new FileInputStream(oldfile); - } - // Get it from the server... - if (input == null) { - URL u = new URL(server + "/icons/" + app.icon); - HttpURLConnection uc = (HttpURLConnection) u.openConnection(); - if (uc.getResponseCode() == 200) { - input = uc.getInputStream(); - } - } - - // Whereever we got the input stream from, copy it... - if (input != null) { + URL u = new URL(server + "/icons/" + app.icon); + HttpURLConnection uc = (HttpURLConnection) u.openConnection(); + if (uc.getResponseCode() == 200) { + input = uc.getInputStream(); output = new FileOutputStream(f); Utils.copy(input, output); }