Update https
This commit is contained in:
parent
6138b60090
commit
ab68c74370
2 changed files with 4 additions and 3 deletions
|
@ -457,10 +457,11 @@ public class TileSourceManager {
|
|||
return MAPILLARY_VECTOR_SOURCE;
|
||||
}
|
||||
|
||||
public static List<TileSourceTemplate> downloadTileSourceTemplates(String versionAsUrl) {
|
||||
public static List<TileSourceTemplate> downloadTileSourceTemplates(String versionAsUrl, boolean https) {
|
||||
final List<TileSourceTemplate> templates = new ArrayList<TileSourceTemplate>();
|
||||
try {
|
||||
URLConnection connection = NetworkUtils.getHttpURLConnection("https://osmand.net/tile_sources?" + versionAsUrl);
|
||||
URLConnection connection = NetworkUtils.getHttpURLConnection((https ? "https" : "http")
|
||||
+ "://osmand.net/tile_sources?" + versionAsUrl);
|
||||
XmlPullParser parser = PlatformUtil.newXMLPullParser();
|
||||
parser.setInput(connection.getInputStream(), "UTF-8");
|
||||
int tok;
|
||||
|
|
|
@ -393,7 +393,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
AsyncTask<Void, Void, List<TileSourceTemplate>> t = new AsyncTask<Void, Void, List<TileSourceTemplate>>() {
|
||||
@Override
|
||||
protected List<TileSourceTemplate> doInBackground(Void... params) {
|
||||
return TileSourceManager.downloadTileSourceTemplates(Version.getVersionAsURLParam(app));
|
||||
return TileSourceManager.downloadTileSourceTemplates(Version.getVersionAsURLParam(app), true);
|
||||
}
|
||||
|
||||
protected void onPostExecute(final java.util.List<TileSourceTemplate> downloaded) {
|
||||
|
|
Loading…
Reference in a new issue