Replace http with https

This commit is contained in:
Alexander Sytnyk 2017-07-21 10:41:26 +03:00
parent f1f8af3925
commit b64e83c6ad
19 changed files with 47 additions and 49 deletions

View file

@ -10,11 +10,11 @@ import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import net.osmand.IProgress; import net.osmand.IProgress;
import net.osmand.IndexConstants; import net.osmand.IndexConstants;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
import net.osmand.aidl.OsmandAidlApi; import net.osmand.aidl.OsmandAidlApi;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.map.OsmandRegions; import net.osmand.map.OsmandRegions;
import net.osmand.map.OsmandRegions.RegionTranslation; import net.osmand.map.OsmandRegions.RegionTranslation;
import net.osmand.map.WorldRegion; import net.osmand.map.WorldRegion;
@ -45,7 +45,6 @@ import net.osmand.plus.voice.MediaCommandPlayerImpl;
import net.osmand.plus.voice.TTSCommandPlayerImpl; import net.osmand.plus.voice.TTSCommandPlayerImpl;
import net.osmand.render.RenderingRulesStorage; import net.osmand.render.RenderingRulesStorage;
import net.osmand.router.RoutingConfiguration; import net.osmand.router.RoutingConfiguration;
import net.osmand.search.SearchUICore;
import net.osmand.util.Algorithms; import net.osmand.util.Algorithms;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
@ -60,6 +59,7 @@ import java.util.List;
import java.util.Random; import java.util.Random;
import btools.routingapp.BRouterServiceConnection; import btools.routingapp.BRouterServiceConnection;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent; import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck; import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLiveUpdatesOn; import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLiveUpdatesOn;
@ -86,7 +86,7 @@ public class AppInitializer implements IProgress {
private static final String VERSION_INSTALLED = "VERSION_INSTALLED"; //$NON-NLS-1$ private static final String VERSION_INSTALLED = "VERSION_INSTALLED"; //$NON-NLS-1$
private static final String EXCEPTION_FILE_SIZE = "EXCEPTION_FS"; //$NON-NLS-1$ private static final String EXCEPTION_FILE_SIZE = "EXCEPTION_FS"; //$NON-NLS-1$
public static final String LATEST_CHANGES_URL = "http://osmand.net/blog?id=osmand-2-7-released"; public static final String LATEST_CHANGES_URL = "https://osmand.net/blog?id=osmand-2-7-released";
// public static final String LATEST_CHANGES_URL = null; // not enough to read // public static final String LATEST_CHANGES_URL = null; // not enough to read
public static final int APP_EXIT_CODE = 4; public static final int APP_EXIT_CODE = 4;
public static final String APP_EXIT_KEY = "APP_EXIT_KEY"; public static final String APP_EXIT_KEY = "APP_EXIT_KEY";

View file

@ -1024,7 +1024,7 @@ public class GPXUtilities {
format.setTimeZone(TimeZone.getTimeZone("UTC")); format.setTimeZone(TimeZone.getTimeZone("UTC"));
XmlSerializer serializer = PlatformUtil.newSerializer(); XmlSerializer serializer = PlatformUtil.newSerializer();
serializer.setOutput(output); serializer.setOutput(output);
serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true); //$NON-NLS-1$ serializer.setFeature("https://xmlpull.org/v1/doc/features.html#indent-output", true); //$NON-NLS-1$
serializer.startDocument("UTF-8", true); //$NON-NLS-1$ serializer.startDocument("UTF-8", true); //$NON-NLS-1$
serializer.startTag(null, "gpx"); //$NON-NLS-1$ serializer.startTag(null, "gpx"); //$NON-NLS-1$
serializer.attribute(null, "version", "1.1"); //$NON-NLS-1$ //$NON-NLS-2$ serializer.attribute(null, "version", "1.1"); //$NON-NLS-1$ //$NON-NLS-2$

View file

@ -1125,7 +1125,7 @@ public class OsmandSettings {
// this value string is synchronized with settings_pref.xml preference name // this value string is synchronized with settings_pref.xml preference name
public final CommonPreference<String> LIVE_MONITORING_URL = new StringPreference("live_monitoring_url", public final CommonPreference<String> LIVE_MONITORING_URL = new StringPreference("live_monitoring_url",
"http://example.com?lat={0}&lon={1}&timestamp={2}&hdop={3}&altitude={4}&speed={5}").makeGlobal(); "https://example.com?lat={0}&lon={1}&timestamp={2}&hdop={3}&altitude={4}&speed={5}").makeGlobal();
public final CommonPreference<String> GPS_STATUS_APP = new StringPreference("gps_status_app", "").makeGlobal(); public final CommonPreference<String> GPS_STATUS_APP = new StringPreference("gps_status_app", "").makeGlobal();

View file

@ -33,7 +33,7 @@ public class Version {
} else if (isGooglePlayEnabled(ctx)) { } else if (isGooglePlayEnabled(ctx)) {
return "market://search?q=pname:"; return "market://search?q=pname:";
} }
return "http://osmand.net/apps?id="; return "https://osmand.net/apps?id=";
} }
private static boolean isAmazonEnabled(OsmandApplication ctx) { private static boolean isAmazonEnabled(OsmandApplication ctx) {

View file

@ -29,11 +29,11 @@ public class HelpActivity extends OsmandActionBarActivity implements AdapterView
// public static final String DIALOG = "dialog"; // public static final String DIALOG = "dialog";
@IdRes @IdRes
public static final String OSMAND_POLL_HTML = "http://osmand.net/android-poll.html"; public static final String OSMAND_POLL_HTML = "https://osmand.net/android-poll.html";
public static final int NULL_ID = -1; public static final int NULL_ID = -1;
private ArrayAdapter<ContextMenuItem> mAdapter; private ArrayAdapter<ContextMenuItem> mAdapter;
//public static final String OSMAND_MAP_LEGEND = "http://osmand.net/help/map-legend_default.png"; //public static final String OSMAND_MAP_LEGEND = "https://osmand.net/help/map-legend_default.png";
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {

View file

@ -167,7 +167,7 @@ public class SearchAddressOnlineFragment extends Fragment implements SearchActiv
NOMINATIM_API = "https://nominatim.openstreetmap.org/search"; NOMINATIM_API = "https://nominatim.openstreetmap.org/search";
} }
else { else {
NOMINATIM_API = "http://nominatim.openstreetmap.org/search"; NOMINATIM_API = "https://nominatim.openstreetmap.org/search";
} }
final List<Place> places = new ArrayList<Place>(); final List<Place> places = new ArrayList<Place>();

View file

@ -1,10 +1,8 @@
package net.osmand.plus.dialogs; package net.osmand.plus.dialogs;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.ContentResolver;
import android.content.Context; import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment; import android.support.v4.app.DialogFragment;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
@ -14,6 +12,7 @@ import android.view.ViewGroup;
import android.webkit.WebSettings; import android.webkit.WebSettings;
import android.webkit.WebView; import android.webkit.WebView;
import android.webkit.WebViewClient; import android.webkit.WebViewClient;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings;
@ -104,12 +103,12 @@ public class HelpArticleDialogFragment extends DialogFragment {
sb.append(fileContents); sb.append(fileContents);
sb.append(FOOTER_INNER); sb.append(FOOTER_INNER);
webView.loadDataWithBaseURL("http://osmand.net", sb.toString(), null, "utf-8", null); webView.loadDataWithBaseURL("https://osmand.net", sb.toString(), null, "utf-8", null);
webView.setWebViewClient(new WebViewClient() { webView.setWebViewClient(new WebViewClient() {
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) { public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith("http://osmand.net/features?id=")) { if (url.startsWith("https://osmand.net/features?id=")) {
String id = url.substring("http://osmand.net/features?id=".length()); String id = url.substring("https://osmand.net/features?id=".length());
dismiss(); dismiss();
instantiateWithAsset("feature_articles/" + id + ".html", getString(R.string.shared_string_help)) instantiateWithAsset("feature_articles/" + id + ".html", getString(R.string.shared_string_help))
.show(getActivity().getSupportFragmentManager(), "DIALOG_HELP_ARTICLE"); .show(getActivity().getSupportFragmentManager(), "DIALOG_HELP_ARTICLE");

View file

@ -1,5 +1,14 @@
package net.osmand.plus.download; package net.osmand.plus.download;
import android.os.Build;
import net.osmand.PlatformUtil;
import net.osmand.osm.io.NetworkUtils;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.Version;
import org.apache.commons.logging.Log;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
@ -11,15 +20,6 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Random; import java.util.Random;
import net.osmand.PlatformUtil;
import net.osmand.osm.io.NetworkUtils;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.Version;
import org.apache.commons.logging.Log;
import android.os.Build;
public class DownloadTracker { public class DownloadTracker {
private static final Log log = PlatformUtil.getLog(DownloadTracker.class); private static final Log log = PlatformUtil.getLog(DownloadTracker.class);
@ -49,7 +49,7 @@ public class DownloadTracker {
Map<String, String> customVariables = getCustomVars(a); Map<String, String> customVariables = getCustomVars(a);
parameters.put("AnalyticsVersion", analyticsVersion); parameters.put("AnalyticsVersion", analyticsVersion);
parameters.put("utmn", randomNumber()); parameters.put("utmn", randomNumber());
parameters.put("utmhn", "http://app.osmand.net"); parameters.put("utmhn", "https://app.osmand.net");
parameters.put("utmni", "1"); parameters.put("utmni", "1");
parameters.put("utmt", "event"); parameters.put("utmt", "event");

View file

@ -344,7 +344,7 @@ public class FirstUsageWizardFragment extends Fragment implements OsmAndLocation
@Override @Override
protected String doInBackground(Void... params) { protected String doInBackground(Void... params) {
try { try {
return AndroidNetworkUtils.sendRequest(app, "http://osmand.net/api/geo-ip", pms, return AndroidNetworkUtils.sendRequest(app, "https://osmand.net/api/geo-ip", pms,
"Requesting location by IP...", false, false); "Requesting location by IP...", false, false);
} catch (Exception e) { } catch (Exception e) {

View file

@ -1,9 +1,12 @@
package net.osmand.plus.helpers; package net.osmand.plus.helpers;
import java.text.SimpleDateFormat; import android.annotation.SuppressLint;
import java.util.Date; import android.content.Intent;
import java.util.LinkedHashMap; import android.net.Uri;
import java.util.Map; import android.os.AsyncTask;
import android.provider.Settings.Secure;
import android.util.Log;
import android.view.View;
import net.osmand.AndroidNetworkUtils; import net.osmand.AndroidNetworkUtils;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
@ -19,13 +22,10 @@ import net.osmand.util.Algorithms;
import org.json.JSONObject; import org.json.JSONObject;
import android.annotation.SuppressLint; import java.text.SimpleDateFormat;
import android.content.Intent; import java.util.Date;
import android.net.Uri; import java.util.LinkedHashMap;
import android.os.AsyncTask; import java.util.Map;
import android.provider.Settings.Secure;
import android.util.Log;
import android.view.View;
public class DiscountHelper { public class DiscountHelper {
@ -38,7 +38,7 @@ public class DiscountHelper {
private static String mIcon; private static String mIcon;
private static String mUrl; private static String mUrl;
private static boolean mBannerVisible; private static boolean mBannerVisible;
private static final String URL = "http://osmand.net/api/motd"; private static final String URL = "https://osmand.net/api/motd";
private static final String INAPP_PREFIX = "osmand-in-app:"; private static final String INAPP_PREFIX = "osmand-in-app:";

View file

@ -186,7 +186,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppList
readMoreBtn.setOnClickListener(new View.OnClickListener() { readMoreBtn.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
Uri uri = Uri.parse("http://osmand.net/osm_live.php"); Uri uri = Uri.parse("https://osmand.net/osm_live.php");
Intent goToOsmLive = new Intent(Intent.ACTION_VIEW, uri); Intent goToOsmLive = new Intent(Intent.ACTION_VIEW, uri);
startActivity(goToOsmLive); startActivity(goToOsmLive);
} }

View file

@ -41,7 +41,7 @@ import java.util.Locale;
public class ReportsFragment extends BaseOsmAndFragment implements CountrySelectionFragment.OnFragmentInteractionListener { public class ReportsFragment extends BaseOsmAndFragment implements CountrySelectionFragment.OnFragmentInteractionListener {
public static final int TITLE = R.string.report; public static final int TITLE = R.string.report;
public static final String DOMAIN = "http://download.osmand.net/"; public static final String DOMAIN = "https://download.osmand.net/";
public static final String TOTAL_CHANGES_BY_MONTH_URL_PATTERN = DOMAIN + public static final String TOTAL_CHANGES_BY_MONTH_URL_PATTERN = DOMAIN +
"reports/query_report.php?report=total_changes_by_month&month=%s&region=%s"; "reports/query_report.php?report=total_changes_by_month&month=%s&region=%s";
public static final String USERS_RANKING_BY_MONTH = DOMAIN + public static final String USERS_RANKING_BY_MONTH = DOMAIN +
@ -51,7 +51,7 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
private static final Log LOG = PlatformUtil.getLog(ReportsFragment.class); private static final Log LOG = PlatformUtil.getLog(ReportsFragment.class);
public static final String OSM_LIVE_URL = "http://osmand.net/osm_live"; public static final String OSM_LIVE_URL = "https://osmand.net/osm_live";
private TextView contributorsTextView; private TextView contributorsTextView;
private TextView editsTextView; private TextView editsTextView;

View file

@ -229,7 +229,7 @@ public class SubscriptionFragment extends BaseOsmAndDialogFragment implements In
showProgress(); showProgress();
AndroidNetworkUtils.sendRequestAsync(getMyApplication(), AndroidNetworkUtils.sendRequestAsync(getMyApplication(),
"http://download.osmand.net/subscription/update.php", "https://download.osmand.net/subscription/update.php",
parameters, "Sending data...", true, true, new AndroidNetworkUtils.OnRequestResultListener() { parameters, "Sending data...", true, true, new AndroidNetworkUtils.OnRequestResultListener() {
@Override @Override
public void onResult(String result) { public void onResult(String result) {

View file

@ -410,7 +410,7 @@ public abstract class ImageCard extends AbstractCard {
if (!Algorithms.isEmpty(preferredLang)) { if (!Algorithms.isEmpty(preferredLang)) {
pms.put("lang", preferredLang); pms.put("lang", preferredLang);
} }
String response = AndroidNetworkUtils.sendRequest(app, "http://osmand.net/api/cm_place.php", pms, String response = AndroidNetworkUtils.sendRequest(app, "https://osmand.net/api/cm_place.php", pms,
"Requesting location images...", false, false); "Requesting location images...", false, false);
if (!Algorithms.isEmpty(response)) { if (!Algorithms.isEmpty(response)) {

View file

@ -82,7 +82,7 @@ public class ShareMenu extends BaseMenuController {
public void share(ShareItem item) { public void share(ShareItem item) {
final int zoom = getMapActivity().getMapView().getZoom(); final int zoom = getMapActivity().getMapView().getZoom();
final String geoUrl = MapUtils.buildGeoUrl(latLon.getLatitude(), latLon.getLongitude(), zoom); final String geoUrl = MapUtils.buildGeoUrl(latLon.getLatitude(), latLon.getLongitude(), zoom);
final String httpUrl = "http://osmand.net/go?lat=" + ((float) latLon.getLatitude()) final String httpUrl = "https://osmand.net/go?lat=" + ((float) latLon.getLatitude())
+ "&lon=" + ((float) latLon.getLongitude()) + "&z=" + zoom; + "&lon=" + ((float) latLon.getLongitude()) + "&z=" + zoom;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (!Algorithms.isEmpty(title)) { if (!Algorithms.isEmpty(title)) {

View file

@ -21,7 +21,6 @@ import net.osmand.PlatformUtil;
import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.Version; import net.osmand.plus.Version;
import net.osmand.plus.notifications.OsmandNotification;
import net.osmand.plus.notifications.OsmandNotification.NotificationType; import net.osmand.plus.notifications.OsmandNotification.NotificationType;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;

View file

@ -443,7 +443,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
final OsmandApplication app = (OsmandApplication) activity.getApplication(); final OsmandApplication app = (OsmandApplication) activity.getApplication();
final OsmandSettings settings = app.getSettings(); final OsmandSettings settings = app.getSettings();
final Map<String, String> entriesMap = settings.getTileSourceEntries(false); final Map<String, String> entriesMap = settings.getTileSourceEntries(false);
TileSourceTemplate ts = new TileSourceTemplate("NewMapnik", "http://mapnik.osmand.net/{0}/{1}/{2}.png", TileSourceTemplate ts = new TileSourceTemplate("NewMapnik", "https://mapnik.osmand.net/{0}/{1}/{2}.png",
"png", 17, 5, 256, 16, 32000); "png", 17, 5, 256, 16, 32000);
final TileSourceTemplate[] result = new TileSourceTemplate[]{ts}; final TileSourceTemplate[] result = new TileSourceTemplate[]{ts};
AlertDialog.Builder bld = new AlertDialog.Builder(activity); AlertDialog.Builder bld = new AlertDialog.Builder(activity);

View file

@ -580,7 +580,7 @@ public class RouteProvider {
ParserConfigurationException, FactoryConfigurationError, SAXException { ParserConfigurationException, FactoryConfigurationError, SAXException {
List<Location> res = new ArrayList<Location>(); List<Location> res = new ArrayList<Location>();
StringBuilder uri = new StringBuilder(); StringBuilder uri = new StringBuilder();
uri.append("http://www.yournavigation.org/api/1.0/gosmore.php?format=kml"); //$NON-NLS-1$ uri.append("https://www.yournavigation.org/api/1.0/gosmore.php?format=kml"); //$NON-NLS-1$
uri.append("&flat=").append(params.start.getLatitude()); //$NON-NLS-1$ uri.append("&flat=").append(params.start.getLatitude()); //$NON-NLS-1$
uri.append("&flon=").append(params.start.getLongitude()); //$NON-NLS-1$ uri.append("&flon=").append(params.start.getLongitude()); //$NON-NLS-1$
uri.append("&tlat=").append(params.end.getLatitude()); //$NON-NLS-1$ uri.append("&tlat=").append(params.end.getLatitude()); //$NON-NLS-1$
@ -998,7 +998,7 @@ public class RouteProvider {
} }
StringBuilder request = new StringBuilder(); StringBuilder request = new StringBuilder();
request.append("http://openls.geog.uni-heidelberg.de/osm/eu/routing?").append("start=").append(params.start.getLongitude()).append(',') request.append("https://openls.geog.uni-heidelberg.de/osm/eu/routing?").append("start=").append(params.start.getLongitude()).append(',')
.append(params.start.getLatitude()).append("&end=").append(params.end.getLongitude()).append(',').append(params.end.getLatitude()) .append(params.start.getLatitude()).append("&end=").append(params.end.getLongitude()).append(',').append(params.end.getLatitude())
.append("&preference=").append(rpref); .append("&preference=").append(rpref);
// TODO if we would get instructions from the service, we could use this language setting // TODO if we would get instructions from the service, we could use this language setting
@ -1170,7 +1170,7 @@ public class RouteProvider {
protected RouteCalculationResult findOSRMRoute(RouteCalculationParams params) protected RouteCalculationResult findOSRMRoute(RouteCalculationParams params)
throws MalformedURLException, IOException, JSONException { throws MalformedURLException, IOException, JSONException {
// http://router.project-osrm.org/route/v1/driving/4.83,52.28;4.95,52.28 // https://router.project-osrm.org/route/v1/driving/4.83,52.28;4.95,52.28
List<Location> res = new ArrayList<Location>(); List<Location> res = new ArrayList<Location>();
StringBuilder uri = new StringBuilder(); StringBuilder uri = new StringBuilder();
// possibly hide that API key because it is privacy of osmand // possibly hide that API key because it is privacy of osmand

View file

@ -28,7 +28,7 @@ public class SeekBarPreference extends DialogPreference implements
private static final String DEFAULT_VALUE_ID = "defaultValue"; private static final String DEFAULT_VALUE_ID = "defaultValue";
private static final String DIALOG_TEXT_ID = "text"; private static final String DIALOG_TEXT_ID = "text";
private static final String DIALOG_MESSAGE_ID = "dialogMessage"; private static final String DIALOG_MESSAGE_ID = "dialogMessage";
private static final String ANDROID_NS = "http://schemas.android.com/apk/res/android"; private static final String ANDROID_NS = "https://schemas.android.com/apk/res/android";
private SeekBar seekBar; private SeekBar seekBar;
private TextView dialogTextView, valueTextView; private TextView dialogTextView, valueTextView;