Fix issue with green backuped indexes
This commit is contained in:
parent
31aa4d3ec4
commit
270d6e72d0
2 changed files with 13 additions and 1 deletions
|
@ -797,7 +797,17 @@ public class ResourceManager {
|
|||
}
|
||||
|
||||
public Map<String, String> getIndexFileNames() {
|
||||
return indexFileNames;
|
||||
return new LinkedHashMap<String, String>(indexFileNames);
|
||||
}
|
||||
|
||||
public Map<String, String> getBackupIndexes(Map<String, String> map) {
|
||||
File file = context.getSettings().extendOsmandPath(BACKUP_PATH);
|
||||
for (File f : file.listFiles()) {
|
||||
if (f.getName().endsWith(IndexConstants.BINARY_MAP_INDEX_EXT)) {
|
||||
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(f.lastModified()))); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public synchronized void reloadTilesFromFS(){
|
||||
|
|
|
@ -149,6 +149,8 @@ public class DownloadIndexActivity extends ExpandableListActivity {
|
|||
});
|
||||
|
||||
indexFileNames = ((OsmandApplication)getApplication()).getResourceManager().getIndexFileNames();
|
||||
((OsmandApplication)getApplication()).getResourceManager().getBackupIndexes(indexFileNames);
|
||||
|
||||
|
||||
filterText = (EditText) findViewById(R.id.search_box);
|
||||
textWatcher = new TextWatcher() {
|
||||
|
|
Loading…
Reference in a new issue