Update MapActivity.java

This commit is contained in:
vshcherb 2015-05-04 20:00:07 +02:00
parent 5aa59c8913
commit 842cd7a1cb

View file

@ -842,8 +842,8 @@ public class MapActivity extends AccessibleActivity {
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()) && "download.osmand.net".equals(data.getHost()) if ("http".equalsIgnoreCase(data.getScheme()) && data.getHost() != null && data.getHost().contains("osmand.net")
&& "/go".equals(data.getPath())) { 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");
if (lat != null && lon != null) { if (lat != null && lon != null) {