Remove Android style URL validation

Fixes #2370
This commit is contained in:
Leith Bade
2015-09-21 14:38:11 +10:00
parent 0f80fb9103
commit 1d565a5159

View File

@@ -744,16 +744,7 @@ public class MapView extends FrameLayout implements LocationListener {
return mNativeMapView.isFullyLoaded();
}
private void validateStyleUrl(String url) {
url = url.replaceFirst("asset://", "http://");
HttpUrl parsedUrl = HttpUrl.parse(url);
if (parsedUrl == null) {
throw new RuntimeException("Style URL is not a valid http, https or asset URL.");
}
}
public void setStyleUrl(String url) {
validateStyleUrl(url);
mStyleUrl = url;
mNativeMapView.setStyleUrl(url);
}