From 81303ce021b4d9dc823a824fbd56abc942e99bdb Mon Sep 17 00:00:00 2001 From: Denis Date: Thu, 9 Oct 2014 16:00:43 +0300 Subject: [PATCH] Removed unused code. --- .../osmand/plus/download/DownloadIndexesThread.java | 2 +- .../plus/download/DownloadOsmandIndexesHelper.java | 13 ------------- OsmAnd/src/net/osmand/plus/download/IndexItem.java | 8 -------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java index e3f579b181..05a05cf045 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexesThread.java @@ -550,7 +550,7 @@ public class DownloadIndexesThread { List stillUpdate = new ArrayList(); for (IndexItem item : itemsToUpdate) { String sfName = item.getTargetFileName(); - java.text.DateFormat format = uiActivity.getMyApplication().getResourceManager().getDateFormat(); + java.text.DateFormat format = app.getResourceManager().getDateFormat(); String date = item.getDate(format); String indexactivateddate = indexActivatedFileNames.get(sfName); String indexfilesdate = indexFileNames.get(sfName); diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java index e4e61fb1bd..d22efa7d4f 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java @@ -85,19 +85,6 @@ public class DownloadOsmandIndexesHelper { File destFile = new File(voicePath, voice + File.separatorChar + "_ttsconfig.p"); result.add(new AssetIndexItem(voice +ext, "voice", date, dateModified, "0.1", 1024*100, key, destFile.getPath(), DownloadActivityType.VOICE_FILE)); - } else if (target.endsWith("/_config.p") && target.startsWith("voice/")) { - String voice = target.substring("voice/".length(), target.length() - "/_config.p".length()); - IndexItem item = result.getIndexFilesByName(key); - if (item != null) { - File destFile = new File(voicePath, voice + File.separatorChar + "_config.p"); - // always use bundled config -// if (item.getTimestamp() > dateModified) { -// continue; -// } - item.timestamp = dateModified; - item.attachedItem = new AssetIndexItem(voice +extvoice, "voice", date, dateModified, "0.1", 1024*100, key, destFile.getPath(), - DownloadActivityType.VOICE_FILE); - } } } result.sort(); diff --git a/OsmAnd/src/net/osmand/plus/download/IndexItem.java b/OsmAnd/src/net/osmand/plus/download/IndexItem.java index a03820929e..312dbc65dc 100644 --- a/OsmAnd/src/net/osmand/plus/download/IndexItem.java +++ b/OsmAnd/src/net/osmand/plus/download/IndexItem.java @@ -27,7 +27,6 @@ public class IndexItem implements Comparable { long timestamp; long contentSize; long containerSize; - IndexItem attachedItem; DownloadActivityType type; @@ -99,13 +98,6 @@ public class IndexItem implements Comparable { if (backup.exists()) { entry.existingBackupFile = backup; } - if (attachedItem != null) { - ArrayList sz = new ArrayList(); - attachedItem.createDownloadEntry(ctx, type, sz); - if(sz.size() > 0) { - entry.attachedEntry = sz.get(0); - } - } downloadEntries.add(entry); } return downloadEntries;