forked from organicmaps/organicmaps
[android][storage] Fix for download size during routing maps downloading.
This commit is contained in:
parent
d3402235ac
commit
62012db7f7
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue