Fix empty downloads list

This commit is contained in:
Alexey Kulish 2015-10-20 16:20:13 +03:00
parent 3f077a70dc
commit 8f4bf41781

View file

@ -250,9 +250,15 @@ public class DownloadIndexesThread {
DownloadResources result = new DownloadResources(app);
DownloadOsmandIndexesHelper.IndexFileList indexFileList = DownloadOsmandIndexesHelper.getIndexesList(ctx);
if (indexFileList != null) {
result.isDownloadedFromInternet = indexFileList.isDownloadedFromInternet();
result.mapVersionIsIncreased = indexFileList.isIncreasedMapVersion();
result.prepareData(indexFileList.getIndexFiles());
try {
while (app.isApplicationInitializing()) {
Thread.sleep(200);
}
result.isDownloadedFromInternet = indexFileList.isDownloadedFromInternet();
result.mapVersionIsIncreased = indexFileList.isIncreasedMapVersion();
result.prepareData(indexFileList.getIndexFiles());
} catch (Exception e) {
}
}
return result;
}