Merge pull request #4359 from osmandapp/links_handle

Fix #4321
This commit is contained in:
Alexey 2017-08-30 10:43:08 +03:00 committed by GitHub
commit ba8fc9e2a8

View file

@ -1312,7 +1312,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
Intent intent = getIntent(); Intent intent = getIntent();
if (intent != null && intent.getData() != null) { if (intent != null && intent.getData() != null) {
Uri data = intent.getData(); Uri data = intent.getData();
if ("http".equalsIgnoreCase(data.getScheme()) && data.getHost() != null && data.getHost().contains("osmand.net") && if (("http".equalsIgnoreCase(data.getScheme()) || "https".equalsIgnoreCase(data.getScheme()))&& data.getHost() != null && data.getHost().contains("osmand.net") &&
data.getPath() != null && data.getPath().startsWith("/go")) { data.getPath() != null && data.getPath().startsWith("/go")) {
String lat = data.getQueryParameter("lat"); String lat = data.getQueryParameter("lat");
String lon = data.getQueryParameter("lon"); String lon = data.getQueryParameter("lon");