diff --git a/OsmAnd/src/net/osmand/plus/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/DownloadOsmandIndexesHelper.java index 90d3c076aa..c1a69f4690 100644 --- a/OsmAnd/src/net/osmand/plus/DownloadOsmandIndexesHelper.java +++ b/OsmAnd/src/net/osmand/plus/DownloadOsmandIndexesHelper.java @@ -76,9 +76,7 @@ public class DownloadOsmandIndexesHelper { public String getVisibleDescription(Context ctx){ String s = ""; //$NON-NLS-1$ - if (fileName.endsWith(IndexConstants.POI_INDEX_EXT) || fileName.endsWith(IndexConstants.POI_INDEX_EXT_ZIP)) { - s = ctx.getString(R.string.poi); - } else if (fileName.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT) + if (fileName.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT) || fileName.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT_ZIP)) { String lowerCase = description.toLowerCase(); if (lowerCase.contains("map")) { //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/ResourceManager.java b/OsmAnd/src/net/osmand/plus/ResourceManager.java index 851fb3881f..562dc29e74 100644 --- a/OsmAnd/src/net/osmand/plus/ResourceManager.java +++ b/OsmAnd/src/net/osmand/plus/ResourceManager.java @@ -551,35 +551,13 @@ public class ResourceManager { } return false; } - + + // POI not supported any more public void indexingPoi(final IProgress progress, List warnings, File f) { if (f.getName().endsWith(IndexConstants.POI_INDEX_EXT)) { - AmenityIndexRepositoryOdb repository = new AmenityIndexRepositoryOdb(); progress.startTask(context.getString(R.string.indexing_poi) + " " + f.getName(), -1); //$NON-NLS-1$ try { - boolean initialized = repository.initialize(progress, f); - if (initialized) { - boolean covered = false; - for(AmenityIndexRepository r : amenityRepositories){ - if(r instanceof AmenityIndexRepositoryBinary){ - double latC = (repository.dataBottomLatitude + repository.dataTopLatitude )/ 2; - double lonC = (repository.dataLeftLongitude + repository.dataRightLongitude) / 2; - if(r.checkContains(latC, lonC)){ - covered = true; - break; - } - } - } - if(covered){ - repository.close(); - warnings.add(context.getString(R.string.old_poi_file_should_be_deleted, f.getName())); //$NON-NLS-1$ - } else { - amenityRepositories.add(repository); - indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(f.lastModified()))); //$NON-NLS-1$ - } - } else { - warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$ - } + warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$ } catch (SQLiteException e) { log.error("Exception reading " + f.getAbsolutePath(), e); //$NON-NLS-1$ warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$ diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java index 0da020b005..b12ef055cd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java @@ -3,9 +3,6 @@ package net.osmand.plus.activities; import static net.osmand.data.IndexConstants.BINARY_MAP_INDEX_EXT; import static net.osmand.data.IndexConstants.BINARY_MAP_INDEX_EXT_ZIP; import static net.osmand.data.IndexConstants.BINARY_MAP_VERSION; -import static net.osmand.data.IndexConstants.POI_INDEX_EXT; -import static net.osmand.data.IndexConstants.POI_INDEX_EXT_ZIP; -import static net.osmand.data.IndexConstants.POI_TABLE_VERSION; import static net.osmand.data.IndexConstants.TTSVOICE_INDEX_EXT_ZIP; import static net.osmand.data.IndexConstants.TTSVOICE_VERSION; import static net.osmand.data.IndexConstants.VOICE_INDEX_EXT_ZIP; @@ -444,7 +441,7 @@ public class DownloadIndexActivity extends ExpandableListActivity { private Collection listAlreadyDownloadedWithAlternatives() { Set files = new TreeSet(); File externalStorageDirectory = OsmandSettings.getOsmandSettings(getApplicationContext()).getExternalStorageDirectory(); - files.addAll(listWithAlternatives(new File(externalStorageDirectory, ResourceManager.POI_PATH),POI_INDEX_EXT,POI_INDEX_EXT_ZIP,POI_TABLE_VERSION)); + // files.addAll(listWithAlternatives(new File(externalStorageDirectory, ResourceManager.POI_PATH),POI_INDEX_EXT,POI_INDEX_EXT_ZIP,POI_TABLE_VERSION)); files.addAll(listWithAlternatives(new File(externalStorageDirectory, ResourceManager.APP_DIR),BINARY_MAP_INDEX_EXT,BINARY_MAP_INDEX_EXT_ZIP,BINARY_MAP_VERSION)); files.addAll(listWithAlternatives(new File(externalStorageDirectory, ResourceManager.BACKUP_PATH),BINARY_MAP_INDEX_EXT,BINARY_MAP_INDEX_EXT_ZIP,BINARY_MAP_VERSION)); files.addAll(listWithAlternatives(new File(externalStorageDirectory, ResourceManager.VOICE_PATH),"",VOICE_INDEX_EXT_ZIP, VOICE_VERSION)); @@ -483,15 +480,7 @@ public class DownloadIndexActivity extends ExpandableListActivity { boolean unzipDir = false; File externalStorageDirectory = OsmandSettings.getOsmandSettings(getApplicationContext()).getExternalStorageDirectory(); - if(fileName.endsWith(IndexConstants.POI_INDEX_EXT)){ - parent = new File(externalStorageDirectory, ResourceManager.POI_PATH); - toSavePostfix = POI_INDEX_EXT; - toCheckPostfix = POI_INDEX_EXT; - } else if(fileName.endsWith(IndexConstants.POI_INDEX_EXT_ZIP)){ - parent = new File(externalStorageDirectory, ResourceManager.POI_PATH); - toSavePostfix = POI_INDEX_EXT_ZIP; - toCheckPostfix = POI_INDEX_EXT; - } else if(fileName.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT)){ + if(fileName.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT)){ parent = new File(externalStorageDirectory, ResourceManager.APP_DIR); toSavePostfix = BINARY_MAP_INDEX_EXT; toCheckPostfix = BINARY_MAP_INDEX_EXT; @@ -620,9 +609,7 @@ public class DownloadIndexActivity extends ExpandableListActivity { private String convertServerFileNameToLocal(String name){ int l = name.lastIndexOf('_'); String s; - if(name.endsWith(IndexConstants.POI_INDEX_EXT) || name.endsWith(IndexConstants.POI_INDEX_EXT_ZIP)){ - s = IndexConstants.POI_INDEX_EXT; - } else if(name.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT) || name.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT_ZIP)){ + if(name.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT) || name.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT_ZIP)){ s = IndexConstants.BINARY_MAP_INDEX_EXT; } else { s = ""; //$NON-NLS-1$