use of net.osmand.aidl.tiles.ASqliteDbFile in project Osmand by osmandapp.
the class OsmandAidlApi method getSqliteDbFiles.
private boolean getSqliteDbFiles(List<ASqliteDbFile> fileNames, boolean activeOnly) {
File tilesPath = app.getAppPath(IndexConstants.TILES_INDEX_DIR);
if (tilesPath.canRead()) {
File[] files = tilesPath.listFiles();
if (files != null) {
String activeFile = app.getSettings().MAP_OVERLAY.get();
for (File tileFile : files) {
String fileName = tileFile.getName();
String fileNameLC = fileName.toLowerCase();
if (tileFile.isFile() && !fileNameLC.startsWith("hillshade") && fileNameLC.endsWith(SQLiteTileSource.EXT)) {
boolean active = fileName.equals(activeFile);
if (!activeOnly || active) {
fileNames.add(new ASqliteDbFile(fileName, tileFile.lastModified(), tileFile.length(), active));
}
}
}
}
}
return true;
}
Aggregations