[android][storage] Fix for download size during routing maps downloading.

This commit is contained in:
Arsentiy Milchakov 2019-05-20 12:35:29 +03:00 committed by Zoia
parent d3402235ac
commit 62012db7f7

View file

@ -25,6 +25,7 @@ using namespace storage;
// The last 5% are left for applying diffs.
float const kMaxProgress = 95.0f;
float const kMaxProgressWithoutDiffs = 100.0f;
enum ItemCategory : uint32_t
{
@ -653,7 +654,7 @@ Java_com_mapswithme_maps_downloader_MapManager_nativeGetOverallProgress(JNIEnv *
jint res = 0;
if (progress.second)
res = static_cast<jint>(progress.first / progress.second);
res = static_cast<jint>(progress.first * kMaxProgressWithoutDiffs / progress.second);
return res;
}