Exclude altitude from paid packages & fix update required

This commit is contained in:
Victor Shcherb 2014-12-06 23:04:04 +01:00
parent d1c2505dcc
commit 948b29697e
3 changed files with 7 additions and 3 deletions

View file

@ -183,7 +183,7 @@ public class DownloadActivityType {
long timestamp = Algorithms.parseLongSilently(
parser.getAttributeValue(null, "timestamp"), 0);
IndexItem it = new IndexItem(name, description, timestamp, size, contentSize, containerSize, this);
it.extra = FileNameTranslationHelper.getStandardMapName(ctx, it.getBasename()) != null;
it.extra = FileNameTranslationHelper.getStandardMapName(ctx, it.getBasename().toLowerCase()) != null;
return it;
}

View file

@ -556,8 +556,8 @@ public class DownloadIndexesThread {
item.getType() == DownloadActivityType.SRTM_COUNTRY_FILE){
itemsToUpdate.add(item);
} else {
long itemSize = item.getSize();
File file = new File(((DownloadOsmandIndexesHelper.AssetIndexItem) item).getDestFile());
long itemSize = item.getContentSize();
File file = new File(item.getType().getDownloadFolder(app, item), sfName);
long oldItemSize = file.length();
if (itemSize != oldItemSize){
itemsToUpdate.add(item);

View file

@ -60,6 +60,10 @@ public class IndexItem implements Comparable<IndexItem> {
return containerSize;
}
public long getContentSize() {
return contentSize;
}
public String getSizeDescription(Context ctx) {
return size + " MB";
}