From f89bd270595884560b9374634f1d54001e6235e1 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 13 May 2018 23:59:44 +0200 Subject: [PATCH] Use https in all places --- OsmAnd-java/src/net/osmand/map/TileSourceManager.java | 2 +- OsmAnd-java/src/net/osmand/router/TurnType.java | 6 +++--- .../osmand/plus/activities/ContributionVersionActivity.java | 4 ++-- .../plus/download/ui/DownloadResourceGroupFragment.java | 2 +- OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java | 4 ++-- .../net/osmand/plus/liveupdates/LiveUpdatesFragment.java | 2 +- OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java | 2 +- .../net/osmand/plus/liveupdates/SubscriptionFragment.java | 2 +- .../plus/mapcontextmenu/builders/cards/ImageCard.java | 2 +- .../src/net/osmand/plus/mapillary/MapillaryImageDialog.java | 4 ++-- .../osmand/plus/resources/IncrementalChangesManager.java | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/map/TileSourceManager.java b/OsmAnd-java/src/net/osmand/map/TileSourceManager.java index 4a0bcbc5cf..99ecd0f974 100644 --- a/OsmAnd-java/src/net/osmand/map/TileSourceManager.java +++ b/OsmAnd-java/src/net/osmand/map/TileSourceManager.java @@ -460,7 +460,7 @@ public class TileSourceManager { public static List downloadTileSourceTemplates(String versionAsUrl) { final List templates = new ArrayList(); try { - URLConnection connection = NetworkUtils.getHttpURLConnection("http://download.osmand.net//tile_sources.php?" + versionAsUrl); + URLConnection connection = NetworkUtils.getHttpURLConnection("https://osmand.net/tile_sources?" + versionAsUrl); XmlPullParser parser = PlatformUtil.newXMLPullParser(); parser.setInput(connection.getInputStream(), "UTF-8"); int tok; diff --git a/OsmAnd-java/src/net/osmand/router/TurnType.java b/OsmAnd-java/src/net/osmand/router/TurnType.java index 31c08814d3..873825c0ea 100644 --- a/OsmAnd-java/src/net/osmand/router/TurnType.java +++ b/OsmAnd-java/src/net/osmand/router/TurnType.java @@ -416,9 +416,9 @@ public class TurnType { public static int convertType(String lane) { int turn; // merge should be recognized as continue route (but it could displayed differently) - if (lane.equals("none") || lane.equals("through") || - lane.equals("merge_to_left") || - lane.equals("merge_to_right")) { + if (lane.equals("none") || lane.equals("through") + || lane.equals("merge_to_left") + || lane.equals("merge_to_right")) { turn = TurnType.C; } else if (lane.equals("slight_right") ) { turn = TurnType.TSLR; diff --git a/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java b/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java index 2701c75f22..f12f445ed7 100644 --- a/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/ContributionVersionActivity.java @@ -41,8 +41,8 @@ public class ContributionVersionActivity extends OsmandListActivity { private static final int INSTALL_BUILD = 2; private static final int ACTIVITY_TO_INSTALL = 23; - private static final String URL_TO_RETRIEVE_BUILDS = "https://download.osmand.net/builds.php"; - private static final String URL_GET_BUILD = "https://download.osmand.net/"; + private static final String URL_TO_RETRIEVE_BUILDS = "https://osmand.net/builds"; + private static final String URL_GET_BUILD = "https://osmand.net/"; private ProgressDialog progressDlg; private Date currentInstalledDate; diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java index 0a2fb28888..a7fb4db8c4 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DownloadResourceGroupFragment.java @@ -287,7 +287,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow parameters.put("email", email); return AndroidNetworkUtils.sendRequest(getMyApplication(), - "http://download.osmand.net/subscription/register_email.php", + "https://osmand.net/subscription/register_email", parameters, "Subscribing email...", true, true); } catch (Exception e) { diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java index f16bdc241b..9a60d06d75 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java +++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java @@ -487,7 +487,7 @@ public class InAppPurchaseHelper { } return AndroidNetworkUtils.sendRequest(ctx, - "http://download.osmand.net/subscription/register.php", + "https://osmand.net/subscription/register", parameters, "Requesting userId...", true, true); } catch (Exception e) { @@ -681,7 +681,7 @@ public class InAppPurchaseHelper { parameters.put("token", token); AndroidNetworkUtils.sendRequestAsync(ctx, - "http://download.osmand.net/subscription/purchased.php", + "https://osmand.net/subscription/purchased", parameters, "Sending purchase info...", true, true, new OnRequestResultListener() { @Override public void onResult(String result) { diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java index 973428dffd..f7c46f4b84 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/LiveUpdatesFragment.java @@ -201,7 +201,7 @@ public class LiveUpdatesFragment extends BaseOsmAndFragment implements InAppPurc readMoreBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - Uri uri = Uri.parse("https://osmand.net/osm_live.php"); + Uri uri = Uri.parse("https://osmand.net/osm_live"); Intent goToOsmLive = new Intent(Intent.ACTION_VIEW, uri); startActivity(goToOsmLive); } diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java index 16abbbcfa5..adf3a93e93 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java @@ -43,7 +43,7 @@ import java.util.Locale; public class ReportsFragment extends BaseOsmAndFragment implements CountrySelectionFragment.OnFragmentInteractionListener { public static final int TITLE = R.string.report; - public static final String DOMAIN = "http://download.osmand.net/"; + public static final String DOMAIN = "https://osmand.net/"; public static final String TOTAL_CHANGES_BY_MONTH_URL_PATTERN = DOMAIN + "reports/query_report.php?report=total_changes_by_month&month=%s®ion=%s"; public static final String USERS_RANKING_BY_MONTH = DOMAIN + diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java index a80f5e9f8a..4af19d6cb7 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java @@ -229,7 +229,7 @@ public class SubscriptionFragment extends BaseOsmAndDialogFragment implements In showProgress(null); AndroidNetworkUtils.sendRequestAsync(getMyApplication(), - "http://download.osmand.net/subscription/update.php", + "https://osmand.net/subscription/update", parameters, "Sending data...", true, true, new AndroidNetworkUtils.OnRequestResultListener() { @Override public void onResult(String result) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java index e4a6d2215c..05f87ea17d 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/cards/ImageCard.java @@ -446,7 +446,7 @@ public abstract class ImageCard extends AbstractCard { if (this.params != null) { pms.putAll(this.params); } - String response = AndroidNetworkUtils.sendRequest(app, "https://osmand.net/api/cm_place.php", pms, + String response = AndroidNetworkUtils.sendRequest(app, "https://osmand.net/api/cm_place", pms, "Requesting location images...", false, false); if (!Algorithms.isEmpty(response)) { diff --git a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java index 950a01ee3c..08241236e1 100644 --- a/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java +++ b/OsmAnd/src/net/osmand/plus/mapillary/MapillaryImageDialog.java @@ -64,9 +64,9 @@ public class MapillaryImageDialog extends ContextMenuCardDialog { private static final String KEY_MAPILLARY_DIALOG_CA = "key_mapillary_dialog_ca"; private static final String MAPILLARY_VIEWER_URL_TEMPLATE = - "https://osmand.net/api/mapillary/photo-viewer.php?photo_id="; + "https://osmand.net/api/mapillary/photo-viewer?photo_id="; private static final String MAPILLARY_HIRES_IMAGE_URL_TEMPLATE = - "https://osmand.net/api/mapillary/get_photo.php?hires=true&photo_id="; + "https://osmand.net/api/mapillary/get_photo?hires=true&photo_id="; private static final String WEBGL_ERROR_MESSAGE = "Error creating WebGL context"; diff --git a/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java b/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java index 4136e75e72..67c180267b 100644 --- a/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java +++ b/OsmAnd/src/net/osmand/plus/resources/IncrementalChangesManager.java @@ -25,7 +25,7 @@ import java.util.concurrent.ConcurrentHashMap; public class IncrementalChangesManager { - private static final String URL = "http://download.osmand.net/check_live.php"; + private static final String URL = "https://osmand.net/check_live"; private static final org.apache.commons.logging.Log log = PlatformUtil.getLog(IncrementalChangesManager.class); private ResourceManager resourceManager; private final Map regions = new ConcurrentHashMap();