Fix empty regions issue
This commit is contained in:
parent
5894ab3137
commit
2ebc2fb9d1
1 changed files with 3 additions and 2 deletions
|
@ -294,13 +294,14 @@ public class DownloadIndexesThread {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected DownloadResources doInBackground(Void... params) {
|
protected DownloadResources doInBackground(Void... params) {
|
||||||
DownloadResources result = new DownloadResources(app);
|
DownloadResources result = null;
|
||||||
DownloadOsmandIndexesHelper.IndexFileList indexFileList = DownloadOsmandIndexesHelper.getIndexesList(ctx);
|
DownloadOsmandIndexesHelper.IndexFileList indexFileList = DownloadOsmandIndexesHelper.getIndexesList(ctx);
|
||||||
if (indexFileList != null) {
|
if (indexFileList != null) {
|
||||||
try {
|
try {
|
||||||
while (app.isApplicationInitializing()) {
|
while (app.isApplicationInitializing()) {
|
||||||
Thread.sleep(200);
|
Thread.sleep(200);
|
||||||
}
|
}
|
||||||
|
result = new DownloadResources(app);
|
||||||
result.isDownloadedFromInternet = indexFileList.isDownloadedFromInternet();
|
result.isDownloadedFromInternet = indexFileList.isDownloadedFromInternet();
|
||||||
result.mapVersionIsIncreased = indexFileList.isIncreasedMapVersion();
|
result.mapVersionIsIncreased = indexFileList.isIncreasedMapVersion();
|
||||||
app.getSettings().LAST_CHECKED_UPDATES.set(System.currentTimeMillis());
|
app.getSettings().LAST_CHECKED_UPDATES.set(System.currentTimeMillis());
|
||||||
|
@ -308,7 +309,7 @@ public class DownloadIndexesThread {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result == null ? new DownloadResources(app) : result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onPostExecute(DownloadResources result) {
|
protected void onPostExecute(DownloadResources result) {
|
||||||
|
|
Loading…
Reference in a new issue