[android] Remove bundled map from Web APK

Closes #342

Signed-off-by: Roman Tsisyk <roman@tsisyk.com>
This commit is contained in:
Roman Tsisyk 2021-04-26 10:20:11 +03:00 committed by Viktor Govako
parent 58ee32a0c6
commit c8f106b0e5
7 changed files with 5 additions and 658 deletions

View file

@ -297,7 +297,7 @@ android {
dimension "default"
versionName = android.defaultConfig.versionName + '-Web'
buildConfigField 'String', 'SUPPORT_MAIL', '"apk@omaps.app"'
android.sourceSets.web.assets.srcDirs = ['flavors/mwm-ttf-assets']
//android.sourceSets.web.assets.srcDirs = ['flavors/mwm-ttf-assets']
}
fdroid {

File diff suppressed because one or more lines are too long

View file

@ -10,15 +10,6 @@
android:baselineAligned="false"
android:layout_margin="@dimen/margin_base_plus"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/image"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingEnd="@dimen/margin_base_plus"
app:srcCompat="@drawable/ic_download_map"
tools:ignore="ContentDescription" />
<RelativeLayout
android:layout_width="0dp"
android:layout_height="match_parent"

View file

@ -18,11 +18,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_download_map"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/head_message"
style="?fontHeadline6"

View file

@ -21,7 +21,7 @@ std::string const kDiffsPath = "diffs";
namespace downloader
{
std::string GetFileDownloadUrl(std::string const & fileName, int64_t dataVersion,
uint64_t diffVersion)
uint64_t diffVersion /* = 0 */)
{
if (diffVersion == 0)
return url::Join(kMapsPath, strings::to_string(dataVersion), url::UrlEncode(fileName));

View file

@ -6,6 +6,6 @@
namespace downloader
{
std::string GetFileDownloadUrl(std::string const & fileName, int64_t dataVersion,
uint64_t diffVersion);
uint64_t diffVersion = 0);
std::string GetFilePathByUrl(std::string const & url);
} // namespace downloader

View file

@ -2,6 +2,7 @@
#include "storage/queued_country.hpp"
#include "platform/downloader_utils.hpp"
#include "platform/http_client.hpp"
#include "platform/platform.hpp"
#include "platform/servers_list.hpp"
@ -71,8 +72,7 @@ void MapFilesDownloader::UnsubscribeAll()
std::string MapFilesDownloader::MakeFullUrlLegacy(std::string const & baseUrl,
std::string const & fileName, int64_t dataVersion)
{
return url::Join(baseUrl, OMIM_OS_NAME, strings::to_string(dataVersion),
url::UrlEncode(fileName));
return url::Join(baseUrl, downloader::GetFileDownloadUrl(fileName, dataVersion));
}
void MapFilesDownloader::SetServersList(ServersList const & serversList)