Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
84338caacc
1 changed files with 11 additions and 1 deletions
|
@ -4,6 +4,7 @@ import static net.osmand.IndexConstants.BINARY_MAP_INDEX_EXT;
|
|||
import static net.osmand.IndexConstants.BINARY_SRTM_MAP_INDEX_EXT;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -149,7 +150,16 @@ public class DownloadActivityType {
|
|||
|
||||
public String getBaseUrl(OsmandApplication ctx, String fileName) {
|
||||
return "http://" + IndexConstants.INDEX_DOWNLOAD_DOMAIN + "/download?event=2&"
|
||||
+ Version.getVersionAsURLParam(ctx) + "&file=" + URLEncoder.encode(fileName, "UTF-8"));
|
||||
+ Version.getVersionAsURLParam(ctx) + "&file=" + encode(fileName);
|
||||
}
|
||||
|
||||
|
||||
protected String encode(String fileName) {
|
||||
try {
|
||||
return URLEncoder.encode(fileName, "UTF-8");
|
||||
} catch (IOException e) {
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue