forked from organicmaps/organicmaps
[android] Fixed crash while terminating any chunk during downloading mwm
This commit is contained in:
parent
abde1966a2
commit
0394c58ec4
2 changed files with 1 additions and 8 deletions
|
@ -396,6 +396,7 @@ public class UpdaterDialogFragment extends BaseMwmDialogFragment
|
|||
}
|
||||
else
|
||||
{
|
||||
MapManager.nativeCancel(CountryItem.getRootId());
|
||||
mFragment.finish();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,9 +218,6 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback
|
|||
|
||||
void SaveResumeChunks()
|
||||
{
|
||||
if (m_writer == nullptr)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
// Flush writer before saving downloaded chunks.
|
||||
|
@ -278,11 +275,6 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback
|
|||
if (m_status != ECompleted && m_goodChunksCount % 10 == 0)
|
||||
SaveResumeChunks();
|
||||
}
|
||||
else if (result == ChunksDownloadStrategy::ENoFreeServers)
|
||||
{
|
||||
// There is no server which is able to re-download chunk.
|
||||
m_status = EFailed;
|
||||
}
|
||||
|
||||
if (m_status != EInProgress)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue