corrections
This commit is contained in:
parent
11e51ef318
commit
c8d76dc85c
3 changed files with 5 additions and 15 deletions
|
@ -1,7 +1,5 @@
|
|||
package net.osmand.map;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.osm.io.NetworkUtils;
|
||||
|
@ -20,7 +18,6 @@ import java.io.FileOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.lang.reflect.Type;
|
||||
import java.net.URLConnection;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
|
@ -707,15 +704,4 @@ public class TileSourceManager {
|
|||
templ.setRandoms(randoms);
|
||||
return templ;
|
||||
}
|
||||
|
||||
public String templatesListToString(List<TileSourceTemplate> templates) {
|
||||
return new Gson().toJson(templates);
|
||||
}
|
||||
|
||||
public List<TileSourceTemplate> parseTemplatesList(String json) {
|
||||
Type type = new TypeToken<List<TileSourceTemplate>>() {
|
||||
}.getType();
|
||||
ArrayList<TileSourceTemplate> templates = new Gson().fromJson(json, type);
|
||||
return templates != null ? templates : new ArrayList<TileSourceTemplate>();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,7 +167,7 @@ public class SQLiteTileSource implements ITileSource {
|
|||
return this.urlTemplate;
|
||||
} else {
|
||||
SQLiteConnection db = getDatabase();
|
||||
if (db == null || db.isReadOnly() || urlTemplate == null) {
|
||||
if (db == null || urlTemplate == null) {
|
||||
return null;
|
||||
} else {
|
||||
return this.urlTemplate;
|
||||
|
|
|
@ -64,8 +64,10 @@ import static net.osmand.IndexConstants.TILES_INDEX_DIR;
|
|||
|
||||
/*
|
||||
Usage:
|
||||
|
||||
SettingsHelper helper = app.getSettingsHelper();
|
||||
File file = new File(app.getAppPath(null), "settings.zip");
|
||||
|
||||
List<SettingsItem> items = new ArrayList<>();
|
||||
items.add(new GlobalSettingsItem(app.getSettings()));
|
||||
items.add(new ProfileSettingsItem(app.getSettings(), ApplicationMode.DEFAULT));
|
||||
|
@ -77,7 +79,9 @@ import static net.osmand.IndexConstants.TILES_INDEX_DIR;
|
|||
items.add(new FileSettingsItem(app, new File(app.getAppPath(RENDERERS_DIR), "default.render.xml")));
|
||||
items.add(new DataSettingsItem(new byte[] {'t', 'e', 's', 't', '1'}, "data1"));
|
||||
items.add(new DataSettingsItem(new byte[] {'t', 'e', 's', 't', '2'}, "data2"));
|
||||
|
||||
helper.exportSettings(file, items);
|
||||
|
||||
helper.importSettings(file);
|
||||
*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue