[android] Added core initialization in service

This commit is contained in:
Dmitry Donskoy 2018-06-18 20:00:22 +03:00 committed by Arsentiy Milchakov
parent 4fec678eab
commit d60e738a40

View file

@ -10,6 +10,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.widget.Toast;
import com.mapswithme.maps.MwmApplication;
import com.mapswithme.maps.R;
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
import com.mapswithme.maps.bookmarks.data.Error;
@ -26,6 +27,16 @@ public class SystemDownloadCompletedService extends IntentService
super("GetFileMetaDataService");
}
@Override
public void onCreate()
{
super.onCreate();
MwmApplication app = (MwmApplication) getApplication();
if (app.arePlatformAndCoreInitialized())
return;
app.initCore();
}
@Override
protected void onHandleIntent(@Nullable Intent intent)
{