Try to fix updates tts files issue.

This commit is contained in:
Denis 2014-12-04 14:43:26 +02:00
parent 434b876965
commit 9a342d2e72
4 changed files with 20 additions and 3 deletions

View file

@ -551,7 +551,17 @@ public class DownloadIndexesThread {
!date.equals(indexactivateddate) &&
!date.equals(indexfilesdate) &&
indexActivatedFileNames.containsKey(sfName)) {
itemsToUpdate.add(item);
if (item.getType() == DownloadActivityType.NORMAL_FILE){
itemsToUpdate.add(item);
} else {
long itemSize = item.getSize();
File file = new File(((DownloadOsmandIndexesHelper.AssetIndexItem) item).getDestFile());
long oldItemSize = file.length();
if (itemSize != oldItemSize){
itemsToUpdate.add(item);
}
}
}
}
if (uiActivity != null){

View file

@ -165,6 +165,10 @@ public class DownloadOsmandIndexesHelper {
res.add(new DownloadEntry(this, assetName, destFile, dateModified));
return res;
}
public String getDestFile(){
return destFile;
}
}

View file

@ -57,6 +57,9 @@ public class IndexItem implements Comparable<IndexItem> {
return timestamp;
}
public long getSize(){
return containerSize;
}
public String getSizeDescription(Context ctx) {
return size + " MB";