diff --git a/OsmAnd/res/layout/context_menu_card_image.xml b/OsmAnd/res/layout/context_menu_card_image.xml index fe2f2fefd7..f29f59ff39 100644 --- a/OsmAnd/res/layout/context_menu_card_image.xml +++ b/OsmAnd/res/layout/context_menu_card_image.xml @@ -28,7 +28,7 @@ android:textColor="?attr/color_dialog_buttons" android:textSize="@dimen/default_list_text_size" android:visibility="gone" - tools:text="http://osmand.net/images/123456789012.jpg" + tools:text="https://osmand.net/images/123456789012.jpg" tools:visibility="visible"/> diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java index 28f4922ed0..88f3431eb3 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivityType.java @@ -233,8 +233,14 @@ public class DownloadActivityType { } public String getBaseUrl(OsmandApplication ctx, String fileName) { - return "http://" + IndexConstants.INDEX_DOWNLOAD_DOMAIN + "/download?event=2&" + String url = "http://" + IndexConstants.INDEX_DOWNLOAD_DOMAIN + "/download?event=2&" + Version.getVersionAsURLParam(ctx) + "&file=" + encode(fileName); + if(this == LIVE_UPDATES_FILE && fileName.length() > 16) { + // DATE_AND_EXT_STR_LEN = "_18_06_02.obf.gz".length() + String region = fileName.substring(0, fileName.length() - 16).toLowerCase(); + url += "®ion=" + encode(region); + } + return url; } diff --git a/OsmAnd/src/net/osmand/plus/search/SendSearchQueryBottomSheet.java b/OsmAnd/src/net/osmand/plus/search/SendSearchQueryBottomSheet.java index bfb171ecce..27e8b4f2b8 100644 --- a/OsmAnd/src/net/osmand/plus/search/SendSearchQueryBottomSheet.java +++ b/OsmAnd/src/net/osmand/plus/search/SendSearchQueryBottomSheet.java @@ -44,7 +44,8 @@ public class SendSearchQueryBottomSheet extends MenuBottomSheetDialogFragment { if (Algorithms.isEmpty(searchQuery)) { return; } - params.put(searchQuery, searchLocation); + params.put("query", searchQuery); + params.put("location", searchLocation); items.add(new TitleItem(getString(R.string.send_search_query))); final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme; final TextView textView = (TextView) View.inflate(new ContextThemeWrapper(getContext(), themeRes), @@ -73,7 +74,7 @@ public class SendSearchQueryBottomSheet extends MenuBottomSheetDialogFragment { Toast.makeText(app, R.string.internet_not_available, Toast.LENGTH_LONG).show(); dismiss(); } else { - AndroidNetworkUtils.sendRequestAsync(app, "http://osmand.net/api/missing_search", params, + AndroidNetworkUtils.sendRequestAsync(app, "https://osmand.net/api/missing_search", params, null, true, true, new AndroidNetworkUtils.OnRequestResultListener() { @Override public void onResult(String result) {